File: /home/undanet/dump/data/wp-content/plugins/code-snippets/js/min/editor.js
!function o(s,a,l){function h(e,t){if(!a[e]){if(!s[e]){var r="function"==typeof require&&require;if(!t&&r)return r(e,!0);if(c)return c(e,!0);var i=new Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}var n=a[e]={exports:{}};s[e][0].call(n.exports,function(t){return h(s[e][1][t]||t)},n,n.exports,o,s,a,l)}return a[e].exports}for(var c="function"==typeof require&&require,t=0;t<l.length;t++)h(l[t]);return h}({1:[function(t,e,r){"use strict";var i,n=(i=t("codemirror/lib/codemirror"))&&i.__esModule?i:{default:i};t("codemirror/mode/php/php"),t("codemirror/addon/edit/matchbrackets"),t("codemirror/addon/edit/closebrackets"),t("codemirror/addon/search/search"),t("codemirror/addon/search/match-highlighter"),t("./php-lint"),window.Code_Snippets_CodeMirror=n.default,n.default.defineMode("php-snippet",function(t){return n.default.getMode(t,{name:"application/x-httpd-php",startOpen:!0})})},{"./php-lint":2,"codemirror/addon/edit/closebrackets":6,"codemirror/addon/edit/matchbrackets":7,"codemirror/addon/search/match-highlighter":10,"codemirror/addon/search/search":12,"codemirror/lib/codemirror":14,"codemirror/mode/php/php":19}],2:[function(t,e,r){"use strict";var n=i(t("php-parser")),o=i(t("codemirror/lib/codemirror"));function i(t){return t&&t.__esModule?t:{default:t}}function s(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}t("codemirror/addon/lint/lint");var a=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.code=t,this.annotations=[],this.function_names=new Set,this.class_names=new Set}var t,r,i;return t=e,(r=[{key:"lint",value:function(){var t=new n.default({parser:{suppressErrors:!0},ast:{withPositions:!0}});try{var e=t.parseEval(this.code);if(e.errors&&0<e.errors.length)for(var r=0;r<e.errors.length;r++)this.annotate(e.errors[r].message,e.errors[r].loc);this.visit(e)}catch(t){this.annotate(t.message,t)}}},{key:"visit",value:function(t){if(t.hasOwnProperty("kind")&&this.validate(t),t.hasOwnProperty("children")){var e=!0,r=!1,i=void 0;try{for(var n,o=t.children[Symbol.iterator]();!(e=(n=o.next()).done);e=!0){var s=n.value;this.visit(s)}}catch(t){r=!0,i=t}finally{try{e||null==o.return||o.return()}finally{if(r)throw i}}}}},{key:"validate",value:function(t){"function"!==t.kind&&"class"!==t.kind||!t.hasOwnProperty("name")||"identifier"!==t.name.kind||("function"===t.kind?this.function_names.has(t.name.name)?this.annotate("Cannot redeclare function ".concat(t.name.name,"()"),t.name.loc):this.function_names.add(t.name.name):"class"===t.kind&&(this.class_names.has(t.name.name)?this.annotate("Cannot redeclare class ".concat(t.name.name),t.name.loc):this.class_names.add(t.name.name)))}},{key:"annotate",value:function(t,e,r){var i,n;e.lineNumber&&e.columnNumber?(i=o.default.Pos(e.lineNumber-1,e.columnNumber-1),n=o.default.Pos(e.lineNumber-1,e.columnNumber)):e.start&&e.end&&(e.end.offset<e.start.offset?(n=o.default.Pos(e.start.line-1,e.start.column),i=o.default.Pos(e.end.line-1,e.end.column)):(i=o.default.Pos(e.start.line-1,e.start.column),n=o.default.Pos(e.end.line-1,e.end.column))),i&&n&&(r=r||"error",this.annotations.push({message:t,severity:r,from:i,to:n}))}}])&&s(t.prototype,r),i&&s(t,i),e}();o.default.registerHelper("lint","php",function(t,e){var r=new a(t);return r.lint(),r.annotations})},{"codemirror/addon/lint/lint":8,"codemirror/lib/codemirror":14,"php-parser":22}],3:[function(t,e,r){"use strict";r.byteLength=function(t){var e=u(t),r=e[0],i=e[1];return 3*(r+i)/4-i},r.toByteArray=function(t){var e,r,i=u(t),n=i[0],o=i[1],s=new c(function(t,e){return 3*(t+e)/4-e}(n,o)),a=0,l=0<o?n-4:n;for(r=0;r<l;r+=4)e=h[t.charCodeAt(r)]<<18|h[t.charCodeAt(r+1)]<<12|h[t.charCodeAt(r+2)]<<6|h[t.charCodeAt(r+3)],s[a++]=e>>16&255,s[a++]=e>>8&255,s[a++]=255&e;2===o&&(e=h[t.charCodeAt(r)]<<2|h[t.charCodeAt(r+1)]>>4,s[a++]=255&e);1===o&&(e=h[t.charCodeAt(r)]<<10|h[t.charCodeAt(r+1)]<<4|h[t.charCodeAt(r+2)]>>2,s[a++]=e>>8&255,s[a++]=255&e);return s},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,n=[],o=0,s=r-i;o<s;o+=16383)n.push(l(t,o,s<o+16383?s:o+16383));1==i?(e=t[r-1],n.push(a[e>>2]+a[e<<4&63]+"==")):2==i&&(e=(t[r-2]<<8)+t[r-1],n.push(a[e>>10]+a[e>>4&63]+a[e<<2&63]+"="));return n.join("")};for(var a=[],h=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,o=i.length;n<o;++n)a[n]=i[n],h[i.charCodeAt(n)]=n;function u(t){var e=t.length;if(0<e%4)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,r){for(var i,n,o=[],s=e;s<r;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),o.push(a[(n=i)>>18&63]+a[n>>12&63]+a[n>>6&63]+a[63&n]);return o.join("")}h["-".charCodeAt(0)]=62,h["_".charCodeAt(0)]=63},{}],4:[function(B,t,U){(function(u){"use strict";var i=B("base64-js"),o=B("ieee754"),t="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;U.Buffer=u,U.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},U.INSPECT_MAX_BYTES=50;var r=2147483647;function s(t){if(r<t)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"!=typeof t)return n(t,e,r);if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}function n(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|f(t,e),i=s(r),n=i.write(t,e);n!==r&&(i=i.slice(0,n));return i}(t,e);if(ArrayBuffer.isView(t))return h(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(M(t,ArrayBuffer)||t&&M(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var i;i=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r);return Object.setPrototypeOf(i,u.prototype),i}(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=t.valueOf&&t.valueOf();if(null!=i&&i!==t)return u.from(i,e,r);var n=function(t){if(u.isBuffer(t)){var e=0|c(t.length),r=s(e);return 0===r.length?r:(t.copy(r,0,0,e),r)}if(void 0!==t.length)return"number"!=typeof t.length||D(t.length)?s(0):h(t);if("Buffer"===t.type&&Array.isArray(t.data))return h(t.data)}(t);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function a(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return a(t),s(t<0?0:0|c(t))}function h(t){for(var e=t.length<0?0:0|c(t.length),r=s(e),i=0;i<e;i+=1)r[i]=255&t[i];return r}function c(t){if(r<=t)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|t}function f(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||M(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,i=2<arguments.length&&!0===arguments[2];if(!i&&0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return O(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return I(t).length;default:if(n)return i?-1:O(t).length;e=(""+e).toLowerCase(),n=!0}}function p(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function d(t,e,r,i,n){if(0===t.length)return-1;if("string"==typeof r?(i=r,r=0):2147483647<r?r=2147483647:r<-2147483648&&(r=-2147483648),D(r=+r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof e&&(e=u.from(e,i)),u.isBuffer(e))return 0===e.length?-1:m(t,e,r,i,n);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,i,n){var o,s=1,a=t.length,l=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;a/=s=2,l/=2,r/=2}function h(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(n){var c=-1;for(o=r;o<a;o++)if(h(t,o)===h(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===l)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(a<r+l&&(r=a-l),o=r;0<=o;o--){for(var u=!0,f=0;f<l;f++)if(h(t,o+f)!==h(e,f)){u=!1;break}if(u)return o}return-1}function g(t,e,r,i){r=Number(r)||0;var n=t.length-r;i?n<(i=Number(i))&&(i=n):i=n;var o=e.length;o/2<i&&(i=o/2);for(var s=0;s<i;++s){var a=parseInt(e.substr(2*s,2),16);if(D(a))return s;t[r+s]=a}return s}function _(t,e,r,i){return R(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,i)}function v(t,e,r,i){return R(function(t,e){for(var r,i,n,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),i=r>>8,n=r%256,o.push(n),o.push(i);return o}(e,t.length-r),t,r,i)}function y(t,e,r){return 0===e&&r===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,r))}function x(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;n<r;){var o,s,a,l,h=t[n],c=null,u=239<h?4:223<h?3:191<h?2:1;if(n+u<=r)switch(u){case 1:h<128&&(c=h);break;case 2:128==(192&(o=t[n+1]))&&127<(l=(31&h)<<6|63&o)&&(c=l);break;case 3:o=t[n+1],s=t[n+2],128==(192&o)&&128==(192&s)&&2047<(l=(15&h)<<12|(63&o)<<6|63&s)&&(l<55296||57343<l)&&(c=l);break;case 4:o=t[n+1],s=t[n+2],a=t[n+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&65535<(l=(15&h)<<18|(63&o)<<12|(63&s)<<6|63&a)&&l<1114112&&(c=l)}null===c?(c=65533,u=1):65535<c&&(c-=65536,i.push(c>>>10&1023|55296),c=56320|1023&c),i.push(c),n+=u}return function(t){var e=t.length;if(e<=T)return String.fromCharCode.apply(String,t);var r="",i=0;for(;i<e;)r+=String.fromCharCode.apply(String,t.slice(i,i+=T));return r}(i)}U.kMaxLength=r,(u.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),u.poolSize=8192,u.from=function(t,e,r){return n(t,e,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,r){return n=e,o=r,a(i=t),i<=0?s(i):void 0!==n?"string"==typeof o?s(i).fill(n,o):s(i).fill(n):s(i);var i,n,o},u.allocUnsafe=function(t){return l(t)},u.allocUnsafeSlow=function(t){return l(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(M(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),M(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,i=e.length,n=0,o=Math.min(r,i);n<o;++n)if(t[n]!==e[n]){r=t[n],i=e[n];break}return r<i?-1:i<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(r=e=0;r<t.length;++r)e+=t[r].length;var i=u.allocUnsafe(e),n=0;for(r=0;r<t.length;++r){var o=t[r];if(M(o,Uint8Array)&&(o=u.from(o)),!u.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,n),n+=o.length}return i},u.byteLength=f,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)p(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)p(this,e,e+3),p(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)p(this,e,e+7),p(this,e+1,e+6),p(this,e+2,e+5),p(this,e+3,e+4);return this},u.prototype.toLocaleString=u.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?x(this,0,t):function(t,e,r){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t=t||"utf8";;)switch(t){case"hex":return w(this,e,r);case"utf8":case"utf-8":return x(this,e,r);case"ascii":return k(this,e,r);case"latin1":case"binary":return b(this,e,r);case"base64":return y(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",e=U.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"},t&&(u.prototype[t]=u.prototype.inspect),u.prototype.compare=function(t,e,r,i,n){if(M(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw new RangeError("out of range index");if(n<=i&&r<=e)return 0;if(n<=i)return-1;if(r<=e)return 1;if(this===t)return 0;for(var o=(n>>>=0)-(i>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),l=this.slice(i,n),h=t.slice(e,r),c=0;c<a;++c)if(l[c]!==h[c]){o=l[c],s=h[c];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return d(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return d(this,t,e,r,!1)},u.prototype.write=function(t,e,r,i){if(void 0===e)i="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)i=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-e;if((void 0===r||n<r)&&(r=n),0<t.length&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i=i||"utf8";for(var o,s,a,l,h,c,u=!1;;)switch(i){case"hex":return g(this,t,e,r);case"utf8":case"utf-8":return h=e,c=r,R(O(t,(l=this).length-h),l,h,c);case"ascii":return _(this,t,e,r);case"latin1":case"binary":return _(this,t,e,r);case"base64":return o=this,s=e,a=r,R(I(t),o,s,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v(this,t,e,r);default:if(u)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),u=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function k(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(127&t[n]);return i}function b(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(t[n]);return i}function w(t,e,r){var i=t.length;(!e||e<0)&&(e=0),(!r||r<0||i<r)&&(r=i);for(var n="",o=e;o<r;++o)n+=P[t[o]];return n}function E(t,e,r){for(var i=t.slice(e,r),n="",o=0;o<i.length;o+=2)n+=String.fromCharCode(i[o]+256*i[o+1]);return n}function C(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(r<t+e)throw new RangeError("Trying to access beyond buffer length")}function S(t,e,r,i,n,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(n<e||e<o)throw new RangeError('"value" argument is out of bounds');if(r+i>t.length)throw new RangeError("Index out of range")}function A(t,e,r,i){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(t,e,r,i,n){return e=+e,r>>>=0,n||A(t,0,r,4),o.write(t,e,r,i,23,4),r+4}function N(t,e,r,i,n){return e=+e,r>>>=0,n||A(t,0,r,8),o.write(t,e,r,i,52,8),r+8}u.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):r<t&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):r<e&&(e=r),e<t&&(e=t);var i=this.subarray(t,e);return Object.setPrototypeOf(i,u.prototype),i},u.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||C(t,e,this.length);for(var i=this[t],n=1,o=0;++o<e&&(n*=256);)i+=this[t+o]*n;return i},u.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||C(t,e,this.length);for(var i=this[t+--e],n=1;0<e&&(n*=256);)i+=this[t+--e]*n;return i},u.prototype.readUInt8=function(t,e){return t>>>=0,e||C(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||C(t,e,this.length);for(var i=this[t],n=1,o=0;++o<e&&(n*=256);)i+=this[t+o]*n;return(n*=128)<=i&&(i-=Math.pow(2,8*e)),i},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||C(t,e,this.length);for(var i=e,n=1,o=this[t+--i];0<i&&(n*=256);)o+=this[t+--i]*n;return(n*=128)<=o&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return t>>>=0,e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||C(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||C(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||C(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||C(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return t>>>=0,e||C(t,4,this.length),o.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||C(t,4,this.length),o.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||C(t,8,this.length),o.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||C(t,8,this.length),o.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,i){t=+t,e>>>=0,r>>>=0,i||S(this,t,e,r,Math.pow(2,8*r)-1,0);var n=1,o=0;for(this[e]=255&t;++o<r&&(n*=256);)this[e+o]=t/n&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,i){t=+t,e>>>=0,r>>>=0,i||S(this,t,e,r,Math.pow(2,8*r)-1,0);var n=r-1,o=1;for(this[e+n]=255&t;0<=--n&&(o*=256);)this[e+n]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);S(this,t,e,r,n-1,-n)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);S(this,t,e,r,n-1,-n)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;0<=--o&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||S(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return N(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return N(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,i){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r=r||0,i||0===i||(i=this.length),e>=t.length&&(e=t.length),e=e||0,0<i&&i<r&&(i=r),i===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-r&&(i=t.length-e+r);var n=i-r;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,i);else if(this===t&&r<e&&e<i)for(var o=n-1;0<=o;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,i),e);return n},u.prototype.fill=function(t,e,r,i){if("string"==typeof t){if("string"==typeof e?(i=e,e=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!u.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===t.length){var n=t.charCodeAt(0);("utf8"===i&&n<128||"latin1"===i)&&(t=n)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,"number"==typeof(t=t||0))for(o=e;o<r;++o)this[o]=t;else{var s=u.isBuffer(t)?t:u.from(t,i),a=s.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var e=/[^+/0-9A-Za-z-_]/g;function O(t,e){var r;e=e||1/0;for(var i=t.length,n=null,o=[],s=0;s<i;++s){if(55295<(r=t.charCodeAt(s))&&r<57344){if(!n){if(56319<r){-1<(e-=3)&&o.push(239,191,189);continue}if(s+1===i){-1<(e-=3)&&o.push(239,191,189);continue}n=r;continue}if(r<56320){-1<(e-=3)&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&-1<(e-=3)&&o.push(239,191,189);if(n=null,r<128){if(--e<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function I(t){return i.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(e,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function R(t,e,r,i){for(var n=0;n<i&&!(n+r>=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function M(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function D(t){return t!=t}var P=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var i=16*r,n=0;n<16;++n)e[i+n]=t[r]+t[n];return e}()}).call(this,B("buffer").Buffer)},{"base64-js":3,buffer:4,ieee754:21}],5:[function(t,e,r){var i;i=function(u){function f(t,e,r){var i,n=t.getWrapperElement();return(i=n.appendChild(document.createElement("div"))).className=r?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof e?i.innerHTML=e:i.appendChild(e),u.addClass(n,"dialog-opened"),i}function p(t,e){t.state.currentNotificationClose&&t.state.currentNotificationClose(),t.state.currentNotificationClose=e}u.defineExtension("openDialog",function(t,e,r){r=r||{},p(this,null);var i=f(this,t,r.bottom),n=!1,o=this;function s(t){if("string"==typeof t)l.value=t;else{if(n)return;n=!0,u.rmClass(i.parentNode,"dialog-opened"),i.parentNode.removeChild(i),o.focus(),r.onClose&&r.onClose(i)}}var a,l=i.getElementsByTagName("input")[0];return l?(l.focus(),r.value&&(l.value=r.value,!1!==r.selectValueOnOpen&&l.select()),r.onInput&&u.on(l,"input",function(t){r.onInput(t,l.value,s)}),r.onKeyUp&&u.on(l,"keyup",function(t){r.onKeyUp(t,l.value,s)}),u.on(l,"keydown",function(t){r&&r.onKeyDown&&r.onKeyDown(t,l.value,s)||((27==t.keyCode||!1!==r.closeOnEnter&&13==t.keyCode)&&(l.blur(),u.e_stop(t),s()),13==t.keyCode&&e(l.value,t))}),!1!==r.closeOnBlur&&u.on(l,"blur",s)):(a=i.getElementsByTagName("button")[0])&&(u.on(a,"click",function(){s(),o.focus()}),!1!==r.closeOnBlur&&u.on(a,"blur",s),a.focus()),s}),u.defineExtension("openConfirm",function(t,e,r){p(this,null);var i=f(this,t,r&&r.bottom),n=i.getElementsByTagName("button"),o=!1,s=this,a=1;function l(){o||(o=!0,u.rmClass(i.parentNode,"dialog-opened"),i.parentNode.removeChild(i),s.focus())}n[0].focus();for(var h=0;h<n.length;++h){var c=n[h];!function(e){u.on(c,"click",function(t){u.e_preventDefault(t),l(),e&&e(s)})}(e[h]),u.on(c,"blur",function(){--a,setTimeout(function(){a<=0&&l()},200)}),u.on(c,"focus",function(){++a})}}),u.defineExtension("openNotification",function(t,e){p(this,s);var r,i=f(this,t,e&&e.bottom),n=!1,o=e&&void 0!==e.duration?e.duration:5e3;function s(){n||(n=!0,clearTimeout(r),u.rmClass(i.parentNode,"dialog-opened"),i.parentNode.removeChild(i))}return u.on(i,"click",function(t){u.e_preventDefault(t),s()}),o&&(r=setTimeout(s,o)),s})},"object"==typeof r&&"object"==typeof e?i(t("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)},{"../../lib/codemirror":14}],6:[function(t,e,r){var i;i=function(k){var r={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},b=k.Pos;function w(t,e){return"pairs"==e&&"string"==typeof t?t:"object"==typeof t&&null!=t[e]?t[e]:r[e]}k.defineOption("autoCloseBrackets",!1,function(t,e,r){r&&r!=k.Init&&(t.removeKeyMap(n),t.state.closeBrackets=null),e&&(i(w(e,"pairs")),t.state.closeBrackets=e,t.addKeyMap(n))});var n={Backspace:function(t){var e=E(t);if(!e||t.getOption("disableInput"))return k.Pass;for(var r=w(e,"pairs"),i=t.listSelections(),n=0;n<i.length;n++){if(!i[n].empty())return k.Pass;var o=a(t,i[n].head);if(!o||r.indexOf(o)%2!=0)return k.Pass}for(n=i.length-1;0<=n;n--){var s=i[n].head;t.replaceRange("",b(s.line,s.ch-1),b(s.line,s.ch+1),"+delete")}},Enter:function(i){var t=E(i),e=t&&w(t,"explode");if(!e||i.getOption("disableInput"))return k.Pass;for(var n=i.listSelections(),r=0;r<n.length;r++){if(!n[r].empty())return k.Pass;var o=a(i,n[r].head);if(!o||e.indexOf(o)%2!=0)return k.Pass}i.operation(function(){var t=i.lineSeparator()||"\n";i.replaceSelection(t+t,null),i.execCommand("goCharLeft"),n=i.listSelections();for(var e=0;e<n.length;e++){var r=n[e].head.line;i.indentLine(r,null,!0),i.indentLine(r+1,null,!0)}})}};function i(t){for(var e=0;e<t.length;e++){var r=t.charAt(e),i="'"+r+"'";n[i]||(n[i]=o(r))}}function o(e){return function(t){return function(n,t){var e=E(n);if(!e||n.getOption("disableInput"))return k.Pass;var r=w(e,"pairs"),i=r.indexOf(t);if(-1==i)return k.Pass;for(var o,s=w(e,"closeBefore"),a=w(e,"triples"),l=r.charAt(i+1)==t,h=n.listSelections(),c=i%2==0,u=0;u<h.length;u++){var f,p=h[u],d=p.head,m=n.getRange(d,b(d.line,d.ch+1));if(c&&!p.empty())f="surround";else if(!l&&c||m!=t)if(l&&1<d.ch&&0<=a.indexOf(t)&&n.getRange(b(d.line,d.ch-2),d)==t+t){if(2<d.ch&&/\bstring/.test(n.getTokenTypeAt(b(d.line,d.ch-2))))return k.Pass;f="addFour"}else if(l){var g=0==d.ch?" ":n.getRange(b(d.line,d.ch-1),d);if(k.isWordChar(m)||g==t||k.isWordChar(g))return k.Pass;f="both"}else{if(!c||!(0===m.length||/\s/.test(m)||-1<s.indexOf(m)))return k.Pass;f="both"}else f=!l||(v=d,y=(_=n).getTokenAt(b(v.line,v.ch+1)),!/\bstring/.test(y.type)||y.start!=v.ch||0!=v.ch&&/\bstring/.test(_.getTokenTypeAt(v)))?0<=a.indexOf(t)&&n.getRange(d,b(d.line,d.ch+3))==t+t+t?"skipThree":"skip":"both";if(o){if(o!=f)return k.Pass}else o=f}var _,v,y;var x=i%2?r.charAt(i-1):t,T=i%2?t:r.charAt(i+1);n.operation(function(){if("skip"==o)n.execCommand("goCharRight");else if("skipThree"==o)for(var t=0;t<3;t++)n.execCommand("goCharRight");else if("surround"==o){var e=n.getSelections();for(t=0;t<e.length;t++)e[t]=x+e[t]+T;n.replaceSelections(e,"around"),e=n.listSelections().slice();for(t=0;t<e.length;t++)e[t]=(r=e[t],i=0<k.cmpPos(r.anchor,r.head),{anchor:new b(r.anchor.line,r.anchor.ch+(i?-1:1)),head:new b(r.head.line,r.head.ch+(i?1:-1))});n.setSelections(e)}else"both"==o?(n.replaceSelection(x+T,null),n.triggerElectric(x+T),n.execCommand("goCharLeft")):"addFour"==o&&(n.replaceSelection(x+x+x+x,"before"),n.execCommand("goCharRight"));var r,i})}(t,e)}}function E(t){var e=t.state.closeBrackets;return!e||e.override?e:t.getModeAt(t.getCursor()).closeBrackets||e}function a(t,e){var r=t.getRange(b(e.line,e.ch-1),b(e.line,e.ch+1));return 2==r.length?r:null}i(r.pairs+"`")},"object"==typeof r&&"object"==typeof e?i(t("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)},{"../../lib/codemirror":14}],7:[function(t,e,r){var i;i=function(i){var c=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),g=i.Pos,_={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function v(t){return t&&t.bracketRegex||/[(){}[\]]/}function u(t,e,r){var i=t.getLineHandle(e.line),n=e.ch-1,o=r&&r.afterCursor;null==o&&(o=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var s=v(r),a=!o&&0<=n&&s.test(i.text.charAt(n))&&_[i.text.charAt(n)]||s.test(i.text.charAt(n+1))&&_[i.text.charAt(++n)];if(!a)return null;var l=">"==a.charAt(1)?1:-1;if(r&&r.strict&&0<l!=(n==e.ch))return null;var h=t.getTokenTypeAt(g(e.line,n+1)),c=f(t,g(e.line,n+(0<l?1:0)),l,h||null,r);return null==c?null:{from:g(e.line,n),to:c&&c.pos,match:c&&c.ch==a.charAt(0),forward:0<l}}function f(t,e,r,i,n){for(var o=n&&n.maxScanLineLength||1e4,s=n&&n.maxScanLines||1e3,a=[],l=v(n),h=0<r?Math.min(e.line+s,t.lastLine()+1):Math.max(t.firstLine()-1,e.line-s),c=e.line;c!=h;c+=r){var u=t.getLine(c);if(u){var f=0<r?0:u.length-1,p=0<r?u.length:-1;if(!(u.length>o))for(c==e.line&&(f=e.ch-(r<0?1:0));f!=p;f+=r){var d=u.charAt(f);if(l.test(d)&&(void 0===i||t.getTokenTypeAt(g(c,f+1))==i)){var m=_[d];if(m&&">"==m.charAt(1)==0<r)a.push(d);else{if(!a.length)return{pos:g(c,f),ch:d};a.pop()}}}}}return c-r!=(0<r?t.lastLine():t.firstLine())&&null}function e(t,e,r){for(var i=t.state.matchBrackets.maxHighlightLineLength||1e3,n=[],o=t.listSelections(),s=0;s<o.length;s++){var a=o[s].empty()&&u(t,o[s].head,r);if(a&&t.getLine(a.from.line).length<=i){var l=a.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";n.push(t.markText(a.from,g(a.from.line,a.from.ch+1),{className:l})),a.to&&t.getLine(a.to.line).length<=i&&n.push(t.markText(a.to,g(a.to.line,a.to.ch+1),{className:l}))}}if(n.length){c&&t.state.focused&&t.focus();function h(){t.operation(function(){for(var t=0;t<n.length;t++)n[t].clear()})}if(!e)return h;setTimeout(h,800)}}function n(t){t.operation(function(){t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null),t.state.matchBrackets.currentlyHighlighted=e(t,!1,t.state.matchBrackets)})}i.defineOption("matchBrackets",!1,function(t,e,r){r&&r!=i.Init&&(t.off("cursorActivity",n),t.state.matchBrackets&&t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null)),e&&(t.state.matchBrackets="object"==typeof e?e:{},t.on("cursorActivity",n))}),i.defineExtension("matchBrackets",function(){e(this,!0)}),i.defineExtension("findMatchingBracket",function(t,e,r){return!r&&"boolean"!=typeof e||(e=r?(r.strict=e,r):e?{strict:!0}:null),u(this,t,e)}),i.defineExtension("scanForBracket",function(t,e,r,i){return f(this,t,e,r,i)})},"object"==typeof r&&"object"==typeof e?i(t("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)},{"../../lib/codemirror":14}],8:[function(t,e,r){var i;i=function(u){"use strict";var d="CodeMirror-lint-markers";function c(t){t.parentNode&&t.parentNode.removeChild(t)}function f(t,e,r){var i,n,o,s=(i=t,n=e,(o=document.createElement("div")).className="CodeMirror-lint-tooltip",o.appendChild(n.cloneNode(!0)),document.body.appendChild(o),u.on(document,"mousemove",a),a(i),null!=o.style.opacity&&(o.style.opacity=1),o);function a(t){if(!o.parentNode)return u.off(document,"mousemove",a);o.style.top=Math.max(0,t.clientY-o.offsetHeight-5)+"px",o.style.left=t.clientX+5+"px"}function l(){var t;u.off(r,"mouseout",l),s&&((t=s).parentNode&&(null==t.style.opacity&&c(t),t.style.opacity=0,setTimeout(function(){c(t)},600)),s=null)}var h=setInterval(function(){if(s)for(var t=r;;t=t.parentNode){if(t&&11==t.nodeType&&(t=t.host),t==document.body)return;if(!t){l();break}}if(!s)return clearInterval(h)},400);u.on(r,"mouseout",l)}function l(e,t,r){this.marked=[],this.options=t,this.timeout=null,this.hasGutter=r,this.onMouseOver=function(t){!function(t,e){var r=e.target||e.srcElement;if(!/\bCodeMirror-lint-mark-/.test(r.className))return;for(var i=r.getBoundingClientRect(),n=(i.left+i.right)/2,o=(i.top+i.bottom)/2,s=t.findMarksAt(t.coordsChar({left:n,top:o},"client")),a=[],l=0;l<s.length;++l){var h=s[l].__annotation;h&&a.push(h)}a.length&&function(t,e){for(var r=e.target||e.srcElement,i=document.createDocumentFragment(),n=0;n<t.length;n++){var o=t[n];i.appendChild(_(o))}f(e,i,r)}(a,e)}(e,t)},this.waitingFor=0}function m(t){var e=t.state.lint;e.hasGutter&&t.clearGutter(d);for(var r=0;r<e.marked.length;++r)e.marked[r].clear();e.marked.length=0}function g(e,t,r,i){var n=document.createElement("div"),o=n;return n.className="CodeMirror-lint-marker-"+t,r&&((o=n.appendChild(document.createElement("div"))).className="CodeMirror-lint-marker-multiple"),0!=i&&u.on(o,"mouseover",function(t){f(t,e,o)}),n}function _(t){var e=t.severity;e=e||"error";var r=document.createElement("div");return r.className="CodeMirror-lint-message-"+e,void 0!==t.messageHTML?r.innerHTML=t.messageHTML:r.appendChild(document.createTextNode(t.message)),r}function h(e){var r,t,i,n,o,s=e.state.lint.options,a=s.options||s,l=s.getAnnotations||e.getHelper(u.Pos(0,0),"lint");if(l)if(s.async||l.async)t=l,i=a,n=(r=e).state.lint,o=++n.waitingFor,r.on("change",c),t(r.getValue(),function(t,e){r.off("change",c),n.waitingFor==o&&(e&&t instanceof u&&(t=e),r.operation(function(){p(r,t)}))},i,r);else{var h=l(e.getValue(),a,e);if(!h)return;h.then?h.then(function(t){e.operation(function(){p(e,t)})}):e.operation(function(){p(e,h)})}function c(){o=-1,r.off("change",c)}}function p(t,e){m(t);for(var r,i,n=t.state.lint,o=n.options,s=function(t){for(var e=[],r=0;r<t.length;++r){var i=t[r],n=i.from.line;(e[n]||(e[n]=[])).push(i)}return e}(e),a=0;a<s.length;++a){var l=s[a];if(l){for(var h=null,c=n.hasGutter&&document.createDocumentFragment(),u=0;u<l.length;++u){var f=l[u],p=f.severity;i=p=p||"error",h="error"==(r=h)?r:i,o.formatAnnotation&&(f=o.formatAnnotation(f)),n.hasGutter&&c.appendChild(_(f)),f.to&&n.marked.push(t.markText(f.from,f.to,{className:"CodeMirror-lint-mark-"+p,__annotation:f}))}n.hasGutter&&t.setGutterMarker(a,d,g(c,h,1<l.length,n.options.tooltips))}}o.onUpdateLinting&&o.onUpdateLinting(e,s,t)}function v(t){var e=t.state.lint;e&&(clearTimeout(e.timeout),e.timeout=setTimeout(function(){h(t)},e.options.delay||500))}u.defineOption("lint",!1,function(t,e,r){if(r&&r!=u.Init&&(m(t),!1!==t.state.lint.options.lintOnChange&&t.off("change",v),u.off(t.getWrapperElement(),"mouseover",t.state.lint.onMouseOver),clearTimeout(t.state.lint.timeout),delete t.state.lint),e){for(var i=t.getOption("gutters"),n=!1,o=0;o<i.length;++o)i[o]==d&&(n=!0);var s=t.state.lint=new l(t,(a=e)instanceof Function?{getAnnotations:a}:(a&&!0!==a||(a={}),a),n);!1!==s.options.lintOnChange&&t.on("change",v),0!=s.options.tooltips&&"gutter"!=s.options.tooltips&&u.on(t.getWrapperElement(),"mouseover",s.onMouseOver),h(t)}var a}),u.defineExtension("performLint",function(){this.state.lint&&h(this)})},"object"==typeof r&&"object"==typeof e?i(t("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)},{"../../lib/codemirror":14}],9:[function(t,e,r){var i;i=function(t){"use strict";function e(t,e){function r(t){clearTimeout(i.doRedraw),i.doRedraw=setTimeout(function(){i.redraw()},t)}this.cm=t,this.options=e,this.buttonHeight=e.scrollButtonHeight||t.getOption("scrollButtonHeight"),this.annotations=[],this.doRedraw=this.doUpdate=null,this.div=t.getWrapperElement().appendChild(document.createElement("div")),this.div.style.cssText="position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none",this.computeScale();var i=this;t.on("refresh",this.resizeHandler=function(){clearTimeout(i.doUpdate),i.doUpdate=setTimeout(function(){i.computeScale()&&r(20)},100)}),t.on("markerAdded",this.resizeHandler),t.on("markerCleared",this.resizeHandler),!1!==e.listenForChanges&&t.on("changes",this.changeHandler=function(){r(250)})}t.defineExtension("annotateScrollbar",function(t){return"string"==typeof t&&(t={className:t}),new e(this,t)}),t.defineOption("scrollButtonHeight",0),e.prototype.computeScale=function(){var t=this.cm,e=(t.getWrapperElement().clientHeight-t.display.barHeight-2*this.buttonHeight)/t.getScrollerElement().scrollHeight;if(e!=this.hScale)return this.hScale=e,!0},e.prototype.update=function(t){this.annotations=t,this.redraw()},e.prototype.redraw=function(t){!1!==t&&this.computeScale();var r=this.cm,e=this.hScale,i=document.createDocumentFragment(),n=this.annotations,o=r.getOption("lineWrapping"),s=o&&1.5*r.defaultTextHeight(),a=null,l=null;function h(t,e){return a!=t.line&&(a=t.line,l=r.getLineHandle(a)),l.widgets&&l.widgets.length||o&&l.height>s?r.charCoords(t,"local")[e?"top":"bottom"]:r.heightAtLine(l,"local")+(e?0:l.height)}var c=r.lastLine();if(r.display.barWidth)for(var u,f=0;f<n.length;f++){var p=n[f];if(!(p.to.line>c)){for(var d=u||h(p.from,!0)*e,m=h(p.to,!1)*e;f<n.length-1&&!(n[f+1].to.line>c)&&!(m+.9<(u=h(n[f+1].from,!0)*e));)m=h((p=n[++f]).to,!1)*e;if(m!=d){var g=Math.max(m-d,3),_=i.appendChild(document.createElement("div"));_.style.cssText="position: absolute; right: 0px; width: "+Math.max(r.display.barWidth-1,2)+"px; top: "+(d+this.buttonHeight)+"px; height: "+g+"px",_.className=this.options.className,p.id&&_.setAttribute("annotation-id",p.id)}}}this.div.textContent="",this.div.appendChild(i)},e.prototype.clear=function(){this.cm.off("refresh",this.resizeHandler),this.cm.off("markerAdded",this.resizeHandler),this.cm.off("markerCleared",this.resizeHandler),this.changeHandler&&this.cm.off("changes",this.changeHandler),this.div.parentNode.removeChild(this.div)}},"object"==typeof r&&"object"==typeof e?i(t("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)},{"../../lib/codemirror":14}],10:[function(t,e,r){var i;i=function(n){"use strict";var r={style:"matchhighlight",minChars:2,delay:100,wordsOnly:!1,annotateScrollbar:!1,showToken:!1,trim:!0};function o(t){for(var e in this.options={},r)this.options[e]=(t&&t.hasOwnProperty(e)?t:r)[e];this.overlay=this.timeout=null,this.matchesonscroll=null,this.active=!1}function s(t){var e=t.state.matchHighlighter;(e.active||t.hasFocus())&&i(t,e)}function a(t){var e=t.state.matchHighlighter;e.active||(e.active=!0,i(t,e))}function i(t,e){clearTimeout(e.timeout),e.timeout=setTimeout(function(){l(t)},e.options.delay)}function c(t,e,r,i){var n,o,s,a=t.state.matchHighlighter;if(t.addOverlay(a.overlay=(n=e,o=r,s=i,{token:function(t){if(t.match(n)&&(!o||(r=o,!((e=t).start&&r.test(e.string.charAt(e.start-1))||e.pos!=e.string.length&&r.test(e.string.charAt(e.pos))))))return s;var e,r;t.next(),t.skipTo(n.charAt(0))||t.skipToEnd()}})),a.options.annotateScrollbar&&t.showMatchesOnScrollbar){var l=r?new RegExp("\\b"+e.replace(/[\\\[.+*?(){|^$]/g,"\\$&")+"\\b"):e;a.matchesonscroll=t.showMatchesOnScrollbar(l,!1,{className:"CodeMirror-selection-highlight-scrollbar"})}}function u(t){var e=t.state.matchHighlighter;e.overlay&&(t.removeOverlay(e.overlay),e.overlay=null,e.matchesonscroll&&(e.matchesonscroll.clear(),e.matchesonscroll=null))}function l(h){h.operation(function(){var t=h.state.matchHighlighter;if(u(h),h.somethingSelected()||!t.options.showToken){var e=h.getCursor("from"),r=h.getCursor("to");if(e.line==r.line&&(!t.options.wordsOnly||function(t,e,r){{if(null===t.getRange(e,r).match(/^\w+$/))return;if(0<e.ch){var i={line:e.line,ch:e.ch-1};if(null===t.getRange(i,e).match(/\W/))return}if(r.ch<t.getLine(e.line).length){i={line:r.line,ch:r.ch+1};if(null===t.getRange(r,i).match(/\W/))return}return 1}}(h,e,r))){var i=h.getRange(e,r);t.options.trim&&(i=i.replace(/^\s+|\s+$/g,"")),i.length>=t.options.minChars&&c(h,i,!1,t.options.style)}}else{for(var n=!0===t.options.showToken?/[\w$]/:t.options.showToken,o=h.getCursor(),s=h.getLine(o.line),a=o.ch,l=a;a&&n.test(s.charAt(a-1));)--a;for(;l<s.length&&n.test(s.charAt(l));)++l;a<l&&c(h,s.slice(a,l),n,t.options.style)}})}n.defineOption("highlightSelectionMatches",!1,function(t,e,r){if(r&&r!=n.Init&&(u(t),clearTimeout(t.state.matchHighlighter.timeout),t.state.matchHighlighter=null,t.off("cursorActivity",s),t.off("focus",a)),e){var i=t.state.matchHighlighter=new o(e);t.hasFocus()?(i.active=!0,l(t)):t.on("focus",a),t.on("cursorActivity",s)}})},"object"==typeof r&&"object"==typeof e?i(t("../../lib/codemirror"),t("./matchesonscrollbar")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./matchesonscrollbar"],i):i(CodeMirror)},{"../../lib/codemirror":14,"./matchesonscrollbar":11}],11:[function(t,e,r){var i;i=function(h){"use strict";function i(t,e,r,i){this.cm=t,this.options=i;var n={listenForChanges:!1};for(var o in i)n[o]=i[o];n.className||(n.className="CodeMirror-search-match"),this.annotation=t.annotateScrollbar(n),this.query=e,this.caseFold=r,this.gap={from:t.firstLine(),to:t.lastLine()+1},this.matches=[],this.update=null,this.findMatches(),this.annotation.update(this.matches);var s=this;t.on("change",this.changeHandler=function(t,e){s.onChange(e)})}h.defineExtension("showMatchesOnScrollbar",function(t,e,r){return"string"==typeof r&&(r={className:r}),new i(this,t,e,r=r||{})});function c(t,e,r){return t<=e?t:Math.max(e,t+r)}i.prototype.findMatches=function(){if(this.gap){for(var t=0;t<this.matches.length;t++){if((i=this.matches[t]).from.line>=this.gap.to)break;i.to.line>=this.gap.from&&this.matches.splice(t--,1)}for(var e=this.cm.getSearchCursor(this.query,h.Pos(this.gap.from,0),{caseFold:this.caseFold,multiline:this.options.multiline}),r=this.options&&this.options.maxMatches||1e3;e.findNext();){var i;if((i={from:e.from(),to:e.to()}).from.line>=this.gap.to)break;if(this.matches.splice(t++,0,i),this.matches.length>r)break}this.gap=null}},i.prototype.onChange=function(t){var e=t.from.line,r=h.changeEnd(t).line,i=r-t.to.line;if(this.gap?(this.gap.from=Math.min(c(this.gap.from,e,i),t.from.line),this.gap.to=Math.max(c(this.gap.to,e,i),t.from.line)):this.gap={from:t.from.line,to:r+1},i)for(var n=0;n<this.matches.length;n++){var o=this.matches[n],s=c(o.from.line,e,i);s!=o.from.line&&(o.from=h.Pos(s,o.from.ch));var a=c(o.to.line,e,i);a!=o.to.line&&(o.to=h.Pos(a,o.to.ch))}clearTimeout(this.update);var l=this;this.update=setTimeout(function(){l.updateAfterChange()},250)},i.prototype.updateAfterChange=function(){this.findMatches(),this.annotation.update(this.matches)},i.prototype.clear=function(){this.cm.off("change",this.changeHandler),this.annotation.clear()}},"object"==typeof r&&"object"==typeof e?i(t("../../lib/codemirror"),t("./searchcursor"),t("../scroll/annotatescrollbar")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../scroll/annotatescrollbar"],i):i(CodeMirror)},{"../../lib/codemirror":14,"../scroll/annotatescrollbar":9,"./searchcursor":13}],12:[function(t,e,r){var i;i=function(p){"use strict";function e(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function d(t){return t.state.search||(t.state.search=new e)}function o(t){return"string"==typeof t&&t==t.toLowerCase()}function m(t,e,r){return t.getSearchCursor(e,r,{caseFold:o(e),multiline:!0})}function g(t,e,r,i,n){t.openDialog?t.openDialog(e,n,{value:i,selectValueOnOpen:!0}):n(prompt(r,i))}function i(t){return t.replace(/\\([nrt\\])/g,function(t,e){return"n"==e?"\n":"r"==e?"\r":"t"==e?"\t":"\\"==e?"\\":t})}function s(t){var e=t.match(/^\/(.*)\/([a-z]*)$/);if(e)try{t=new RegExp(e[1],-1==e[2].indexOf("i")?"":"i")}catch(t){}else t=i(t);return("string"==typeof t?""==t:t.test(""))&&(t=/x^/),t}function _(t,e,r){var i,n;e.queryText=r,e.query=s(r),t.removeOverlay(e.overlay,o(e.query)),e.overlay=(i=e.query,n=o(e.query),"string"==typeof i?i=new RegExp(i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),n?"gi":"g"):i.global||(i=new RegExp(i.source,i.ignoreCase?"gi":"g")),{token:function(t){i.lastIndex=t.pos;var e=i.exec(t.string);if(e&&e.index==t.pos)return t.pos+=e[0].length||1,"searching";e?t.pos=e.index:t.skipToEnd()}}),t.addOverlay(e.overlay),t.showMatchesOnScrollbar&&(e.annotate&&(e.annotate.clear(),e.annotate=null),e.annotate=t.showMatchesOnScrollbar(e.query,o(e.query)))}function r(o,e,t,r){var i=d(o);if(i.query)return v(o,e);var n,s,a,l,h,c=o.getSelection()||i.lastQuery;if(c instanceof RegExp&&"x^"==c.source&&(c=null),t&&o.openDialog){var u=null,f=function(t,e){p.e_stop(e),t&&(t!=i.queryText&&(_(o,i,t),i.posFrom=i.posTo=o.getCursor()),u&&(u.style.opacity=1),v(o,e.shiftKey,function(t,e){var r;e.line<3&&document.querySelector&&(r=o.display.wrapper.querySelector(".CodeMirror-dialog"))&&r.getBoundingClientRect().bottom-4>o.cursorCoords(e,"window").top&&((u=r).style.opacity=.4)}))};s=x(n=o),a=c,l=f,h=function(t,e){var r=p.keyName(t),i=o.getOption("extraKeys"),n=i&&i[r]||p.keyMap[o.getOption("keyMap")][r];"findNext"==n||"findPrev"==n||"findPersistentNext"==n||"findPersistentPrev"==n?(p.e_stop(t),_(o,d(o),e),o.execCommand(n)):"find"!=n&&"findPersistent"!=n||(p.e_stop(t),f(e,t))},n.openDialog(s,l,{value:a,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){y(n)},onKeyDown:h}),r&&c&&(_(o,i,c),v(o,e))}else g(o,x(o),"Search for:",c,function(t){t&&!i.query&&o.operation(function(){_(o,i,t),i.posFrom=i.posTo=o.getCursor(),v(o,e)})})}function v(r,i,n){r.operation(function(){var t=d(r),e=m(r,t.query,i?t.posFrom:t.posTo);(e.find(i)||(e=m(r,t.query,i?p.Pos(r.lastLine()):p.Pos(r.firstLine(),0))).find(i))&&(r.setSelection(e.from(),e.to()),r.scrollIntoView({from:e.from(),to:e.to()},20),t.posFrom=e.from(),t.posTo=e.to(),n&&n(e.from(),e.to()))})}function y(e){e.operation(function(){var t=d(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))})}function x(t){return'<span class="CodeMirror-search-label">'+t.phrase("Search:")+'</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+t.phrase("(Use /re/ syntax for regexp search)")+"</span>"}function T(e,i,n){e.operation(function(){for(var t=m(e,i);t.findNext();)if("string"!=typeof i){var r=e.getRange(t.from(),t.to()).match(i);t.replace(n.replace(/\$(\d)/g,function(t,e){return r[e]}))}else t.replace(n)})}function n(f,t){if(!f.getOption("readOnly")){var e=f.getSelection()||d(f).lastQuery,r='<span class="CodeMirror-search-label">'+(t?f.phrase("Replace all:"):f.phrase("Replace:"))+"</span>";g(f,r+(' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+f.phrase("(Use /re/ syntax for regexp search)")+"</span>"),r,e,function(u){u&&(u=s(u),g(f,'<span class="CodeMirror-search-label">'+f.phrase("With:")+'</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/>',f.phrase("Replace with:"),"",function(a){if(a=i(a),t)T(f,u,a);else{y(f);var l=m(f,u,f.getCursor("from")),h=function(){var t,e,r,i,n,o,s=l.from();!(t=l.findNext())&&(l=m(f,u),!(t=l.findNext())||s&&l.from().line==s.line&&l.from().ch==s.ch)||(f.setSelection(l.from(),l.to()),f.scrollIntoView({from:l.from(),to:l.to()}),r='<span class="CodeMirror-search-label">'+(o=e=f).phrase("Replace?")+"</span> <button>"+o.phrase("Yes")+"</button> <button>"+o.phrase("No")+"</button> <button>"+o.phrase("All")+"</button> <button>"+o.phrase("Stop")+"</button> ",i=f.phrase("Replace?"),n=[function(){c(t)},h,function(){T(f,u,a)}],e.openConfirm?e.openConfirm(r,n):confirm(i)&&n[0]())},c=function(r){l.replace("string"==typeof u?a:a.replace(/\$(\d)/g,function(t,e){return r[e]})),h()};h()}}))})}}p.commands.find=function(t){y(t),r(t)},p.commands.findPersistent=function(t){y(t),r(t,!1,!0)},p.commands.findPersistentNext=function(t){r(t,!1,!0,!0)},p.commands.findPersistentPrev=function(t){r(t,!0,!0,!0)},p.commands.findNext=r,p.commands.findPrev=function(t){r(t,!0)},p.commands.clearSearch=y,p.commands.replace=n,p.commands.replaceAll=function(t){n(t,!0)}},"object"==typeof r&&"object"==typeof e?i(t("../../lib/codemirror"),t("./searchcursor"),t("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../dialog/dialog"],i):i(CodeMirror)},{"../../lib/codemirror":14,"../dialog/dialog":5,"./searchcursor":13}],13:[function(t,e,r){var i;i=function(n){"use strict";var _,v,y=n.Pos;function m(t,e){for(var r,i,n=null!=(i=(r=t).flags)?i:(r.ignoreCase?"i":"")+(r.global?"g":"")+(r.multiline?"m":""),o=n,s=0;s<e.length;s++)-1==o.indexOf(e.charAt(s))&&(o+=e.charAt(s));return n==o?t:new RegExp(t.source,o)}function g(t){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(t.source)}function d(t,e,r){e=m(e,"g");for(var i=r.line,n=r.ch,o=t.lastLine();i<=o;i++,n=0){e.lastIndex=n;var s=t.getLine(i),a=e.exec(s);if(a)return{from:y(i,a.index),to:y(i,a.index+a[0].length),match:a}}}function x(t,e,r){for(var i,n=0;n<=t.length;){e.lastIndex=n;var o=e.exec(t);if(!o)break;var s=o.index+o[0].length;if(s>t.length-r)break;(!i||s>i.index+i[0].length)&&(i=o),n=o.index+1}return i}function T(t,e,r){e=m(e,"g");for(var i=r.line,n=r.ch,o=t.firstLine();o<=i;i--,n=-1){var s=t.getLine(i),a=x(s,e,n<0?0:s.length-n);if(a)return{from:y(i,a.index),to:y(i,a.index+a[0].length),match:a}}}function k(t,e,r,i){if(t.length==e.length)return r;for(var n=0,o=r+Math.max(0,t.length-e.length);;){if(n==o)return n;var s=n+o>>1,a=i(t.slice(0,s)).length;if(a==r)return s;r<a?o=s:n=1+s}}function i(r,i,t,e){var n;this.atOccurrence=!1,this.doc=r,t=t?r.clipPos(t):y(0,0),this.pos={from:t,to:t},"object"==typeof e?n=e.caseFold:(n=e,e=null),"string"==typeof i?(null==n&&(n=!1),this.matches=function(t,e){return(t?function(t,e,r,i){if(!e.length)return null;var n=i?_:v,o=n(e).split(/\r|\n\r?/);t:for(var s=r.line,a=r.ch,l=t.firstLine()-1+o.length;l<=s;s--,a=-1){var h=t.getLine(s);-1<a&&(h=h.slice(0,a));var c=n(h);if(1==o.length){var u=c.lastIndexOf(o[0]);if(-1==u)continue t;return{from:y(s,k(h,c,u,n)),to:y(s,k(h,c,u+o[0].length,n))}}var f=o[o.length-1];if(c.slice(0,f.length)==f){var p=1;for(r=s-o.length+1;p<o.length-1;p++)if(n(t.getLine(r+p))!=o[p])continue t;var d=t.getLine(s+1-o.length),m=n(d);if(m.slice(m.length-o[0].length)==o[0])return{from:y(s+1-o.length,k(d,m,d.length-o[0].length,n)),to:y(s,k(h,c,f.length,n))}}}}:function(t,e,r,i){if(!e.length)return null;var n=i?_:v,o=n(e).split(/\r|\n\r?/);t:for(var s=r.line,a=r.ch,l=t.lastLine()+1-o.length;s<=l;s++,a=0){var h=t.getLine(s).slice(a),c=n(h);if(1==o.length){var u=c.indexOf(o[0]);if(-1==u)continue t;r=k(h,c,u,n)+a;return{from:y(s,k(h,c,u,n)+a),to:y(s,k(h,c,u+o[0].length,n)+a)}}var f=c.length-o[0].length;if(c.slice(f)==o[0]){for(var p=1;p<o.length-1;p++)if(n(t.getLine(s+p))!=o[p])continue t;var d=t.getLine(s+o.length-1),m=n(d),g=o[o.length-1];if(m.slice(0,g.length)==g)return{from:y(s,k(h,c,f,n)+a),to:y(s+o.length-1,k(d,m,g.length,n))}}}})(r,i,e,n)}):(i=m(i,"gm"),e&&!1===e.multiline?this.matches=function(t,e){return(t?T:d)(r,i,e)}:this.matches=function(t,e){return(t?function(t,e,r){if(!g(e))return T(t,e,r);e=m(e,"gm");for(var i,n=1,o=t.getLine(r.line).length-r.ch,s=r.line,a=t.firstLine();a<=s;){for(var l=0;l<n&&a<=s;l++){var h=t.getLine(s--);i=null==i?h:h+"\n"+i}n*=2;var c=x(i,e,o);if(c){var u=i.slice(0,c.index).split("\n"),f=c[0].split("\n"),p=s+u.length,d=u[u.length-1].length;return{from:y(p,d),to:y(p+f.length-1,1==f.length?d+f[0].length:f[f.length-1].length),match:c}}}}:function(t,e,r){if(!g(e))return d(t,e,r);e=m(e,"gm");for(var i,n=1,o=r.line,s=t.lastLine();o<=s;){for(var a=0;a<n&&!(s<o);a++){var l=t.getLine(o++);i=null==i?l:i+"\n"+l}n*=2,e.lastIndex=r.ch;var h=e.exec(i);if(h){var c=i.slice(0,h.index).split("\n"),u=h[0].split("\n"),f=r.line+c.length-1,p=c[c.length-1].length;return{from:y(f,p),to:y(f+u.length-1,1==u.length?p+u[0].length:u[u.length-1].length),match:h}}}})(r,i,e)})}v=String.prototype.normalize?(_=function(t){return t.normalize("NFD").toLowerCase()},function(t){return t.normalize("NFD")}):(_=function(t){return t.toLowerCase()},function(t){return t}),i.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){for(var e=this.matches(t,this.doc.clipPos(t?this.pos.from:this.pos.to));e&&0==n.cmpPos(e.from,e.to);)t?e.from.ch?e.from=y(e.from.line,e.from.ch-1):e=e.from.line==this.doc.firstLine()?null:this.matches(t,this.doc.clipPos(y(e.from.line-1))):e.to.ch<this.doc.getLine(e.to.line).length?e.to=y(e.to.line,e.to.ch+1):e=e.to.line==this.doc.lastLine()?null:this.matches(t,y(e.to.line+1,0));if(e)return this.pos=e,this.atOccurrence=!0,this.pos.match||!0;var r=y(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:r,to:r},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,e){if(this.atOccurrence){var r=n.splitLines(t);this.doc.replaceRange(r,this.pos.from,this.pos.to,e),this.pos.to=y(this.pos.from.line+r.length-1,r[r.length-1].length+(1==r.length?this.pos.from.ch:0))}}},n.defineExtension("getSearchCursor",function(t,e,r){return new i(this.doc,t,e,r)}),n.defineDocExtension("getSearchCursor",function(t,e,r){return new i(this,t,e,r)}),n.defineExtension("selectMatches",function(t,e){for(var r=[],i=this.getSearchCursor(t,this.getCursor("from"),e);i.findNext()&&!(0<n.cmpPos(i.to(),this.getCursor("to")));)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)})},"object"==typeof r&&"object"==typeof e?i(t("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)},{"../../lib/codemirror":14}],14:[function(t,e,r){var i,n;i=this,n=function(){"use strict";var t=navigator.userAgent,e=navigator.platform,m=/gecko\/\d/i.test(t),r=/MSIE \d/.test(t),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),n=/Edge\/(\d+)/.exec(t),T=r||i||n,k=T&&(r?document.documentMode||6:+(n||i)[1]),y=!n&&/WebKit\//.test(t),o=y&&/Qt\/\d+\.\d+/.test(t),s=!n&&/Chrome\//.test(t),g=/Opera\//.test(t),l=/Apple Computer/.test(navigator.vendor),a=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),h=/PhantomJS/.test(t),c=!n&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t),u=/Android/.test(t),f=c||u||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),x=c||/Mac/.test(e),p=/\bCrOS\b/.test(t),d=/win/i.test(e),_=g&&t.match(/Version\/(\d*\.\d*)/);(_=_&&Number(_[1]))&&15<=_&&(y=!(g=!1));var v=x&&(o||g&&(null==_||_<12.11)),b=m||T&&9<=k;function w(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var E,C=function(t,e){var r=t.className,i=w(e).exec(r);if(i){var n=r.slice(i.index+i[0].length);t.className=r.slice(0,i.index)+(n?i[1]+n:"")}};function S(t){for(var e=t.childNodes.length;0<e;--e)t.removeChild(t.firstChild);return t}function A(t,e){return S(t).appendChild(e)}function N(t,e,r,i){var n=document.createElement(t);if(r&&(n.className=r),i&&(n.style.cssText=i),"string"==typeof e)n.appendChild(document.createTextNode(e));else if(e)for(var o=0;o<e.length;++o)n.appendChild(e[o]);return n}function L(t,e,r,i){var n=N(t,e,r,i);return n.setAttribute("role","presentation"),n}function O(t,e){if(3==e.nodeType&&(e=e.parentNode),t.contains)return t.contains(e);do{if(11==e.nodeType&&(e=e.host),e==t)return!0}while(e=e.parentNode)}function I(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function R(t,e){var r=t.className;w(e).test(r)||(t.className+=(r?" ":"")+e)}function M(t,e){for(var r=t.split(" "),i=0;i<r.length;i++)r[i]&&!w(r[i]).test(e)&&(e+=" "+r[i]);return e}E=document.createRange?function(t,e,r,i){var n=document.createRange();return n.setEnd(i||t,r),n.setStart(t,e),n}:function(t,e,r){var i=document.body.createTextRange();try{i.moveToElementText(t.parentNode)}catch(t){return i}return i.collapse(!0),i.moveEnd("character",r),i.moveStart("character",e),i};var D=function(t){t.select()};function P(t){var e=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,e)}}function B(t,e,r){for(var i in e=e||{},t)!t.hasOwnProperty(i)||!1===r&&e.hasOwnProperty(i)||(e[i]=t[i]);return e}function U(t,e,r,i,n){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);for(var o=i||0,s=n||0;;){var a=t.indexOf("\t",o);if(a<0||e<=a)return s+(e-o);s+=a-o,s+=r-s%r,o=a+1}}c?D=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:T&&(D=function(t){try{t.select()}catch(t){}});var F=function(){this.id=null,this.f=null,this.time=0,this.handler=P(this.onTimeout,this)};function H(t,e){for(var r=0;r<t.length;++r)if(t[r]==e)return r;return-1}F.prototype.onTimeout=function(t){t.id=0,t.time<=+new Date?t.f():setTimeout(t.handler,t.time-new Date)},F.prototype.set=function(t,e){this.f=e;var r=+new Date+t;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,t),this.time=r)};var z=30,W={toString:function(){return"CodeMirror.Pass"}},q={scroll:!1},G={origin:"*mouse"},j={origin:"+move"};function V(t,e,r){for(var i=0,n=0;;){var o=t.indexOf("\t",i);-1==o&&(o=t.length);var s=o-i;if(o==t.length||e<=n+s)return i+Math.min(s,e-n);if(n+=o-i,i=o+1,e<=(n+=r-n%r))return i}}var Y=[""];function K(t){for(;Y.length<=t;)Y.push($(Y)+" ");return Y[t]}function $(t){return t[t.length-1]}function Q(t,e){for(var r=[],i=0;i<t.length;i++)r[i]=e(t[i],i);return r}function X(){}function Z(t,e){var r;return r=Object.create?Object.create(t):(X.prototype=t,new X),e&&B(e,r),r}var J=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function tt(t){return/\w/.test(t)||""<t&&(t.toUpperCase()!=t.toLowerCase()||J.test(t))}function et(t,e){return e?!!(-1<e.source.indexOf("\\w")&&tt(t))||e.test(t):tt(t)}function rt(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return;return 1}var it=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function nt(t){return 768<=t.charCodeAt(0)&&it.test(t)}function ot(t,e,r){for(;(r<0?0<e:e<t.length)&&nt(t.charAt(e));)e+=r;return e}function st(t,e,r){for(var i=r<e?-1:1;;){if(e==r)return e;var n=(e+r)/2,o=i<0?Math.ceil(n):Math.floor(n);if(o==e)return t(o)?e:r;t(o)?r=o:e=o+i}}var at=null;function lt(t,e,r){var i;at=null;for(var n=0;n<t.length;++n){var o=t[n];if(o.from<e&&o.to>e)return n;o.to==e&&(o.from!=o.to&&"before"==r?i=n:at=n),o.from==e&&(o.from!=o.to&&"before"!=r?i=n:at=n)}return null!=i?i:at}var ht,ct,ut,ft,pt,dt,mt,gt=(ht="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ct="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",ut=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,ft=/[stwN]/,pt=/[LRr]/,dt=/[Lb1n]/,mt=/[1n]/,function(t,e){var r="ltr"==e?"L":"R";if(0==t.length||"ltr"==e&&!ut.test(t))return!1;for(var i,n=t.length,o=[],s=0;s<n;++s)o.push((i=t.charCodeAt(s))<=247?ht.charAt(i):1424<=i&&i<=1524?"R":1536<=i&&i<=1785?ct.charAt(i-1536):1774<=i&&i<=2220?"r":8192<=i&&i<=8203?"w":8204==i?"b":"L");for(var a=0,l=r;a<n;++a){var h=o[a];"m"==h?o[a]=l:l=h}for(var c=0,u=r;c<n;++c){var f=o[c];"1"==f&&"r"==u?o[c]="n":pt.test(f)&&"r"==(u=f)&&(o[c]="R")}for(var p=1,d=o[0];p<n-1;++p){var m=o[p];"+"==m&&"1"==d&&"1"==o[p+1]?o[p]="1":","!=m||d!=o[p+1]||"1"!=d&&"n"!=d||(o[p]=d),d=m}for(var g=0;g<n;++g){var _=o[g];if(","==_)o[g]="N";else if("%"==_){var v=void 0;for(v=g+1;v<n&&"%"==o[v];++v);for(var y=g&&"!"==o[g-1]||v<n&&"1"==o[v]?"1":"N",x=g;x<v;++x)o[x]=y;g=v-1}}for(var T=0,k=r;T<n;++T){var b=o[T];"L"==k&&"1"==b?o[T]="L":pt.test(b)&&(k=b)}for(var w=0;w<n;++w)if(ft.test(o[w])){var E=void 0;for(E=w+1;E<n&&ft.test(o[E]);++E);for(var C="L"==(w?o[w-1]:r),S=C==("L"==(E<n?o[E]:r))?C?"L":"R":r,A=w;A<E;++A)o[A]=S;w=E-1}for(var L,N=[],O=0;O<n;)if(dt.test(o[O])){var I=O;for(++O;O<n&&dt.test(o[O]);++O);N.push(new _t(0,I,O))}else{var R=O,M=N.length;for(++O;O<n&&"L"!=o[O];++O);for(var D=R;D<O;)if(mt.test(o[D])){R<D&&N.splice(M,0,new _t(1,R,D));var P=D;for(++D;D<O&&mt.test(o[D]);++D);N.splice(M,0,new _t(2,P,D)),R=D}else++D;R<O&&N.splice(M,0,new _t(1,R,O))}return"ltr"==e&&(1==N[0].level&&(L=t.match(/^\s+/))&&(N[0].from=L[0].length,N.unshift(new _t(0,0,L[0].length))),1==$(N).level&&(L=t.match(/\s+$/))&&($(N).to-=L[0].length,N.push(new _t(0,n-L[0].length,n)))),"rtl"==e?N.reverse():N});function _t(t,e,r){this.level=t,this.from=e,this.to=r}function vt(t,e){var r=t.order;return null==r&&(r=t.order=gt(t.text,e)),r}var yt=[],xt=function(t,e,r){if(t.addEventListener)t.addEventListener(e,r,!1);else if(t.attachEvent)t.attachEvent("on"+e,r);else{var i=t._handlers||(t._handlers={});i[e]=(i[e]||yt).concat(r)}};function Tt(t,e){return t._handlers&&t._handlers[e]||yt}function kt(t,e,r){if(t.removeEventListener)t.removeEventListener(e,r,!1);else if(t.detachEvent)t.detachEvent("on"+e,r);else{var i=t._handlers,n=i&&i[e];if(n){var o=H(n,r);-1<o&&(i[e]=n.slice(0,o).concat(n.slice(o+1)))}}}function bt(t,e){var r=Tt(t,e);if(r.length)for(var i=Array.prototype.slice.call(arguments,2),n=0;n<r.length;++n)r[n].apply(null,i)}function wt(t,e,r){return"string"==typeof e&&(e={type:e,preventDefault:function(){this.defaultPrevented=!0}}),bt(t,r||e.type,t,e),Nt(e)||e.codemirrorIgnore}function Et(t){var e=t._handlers&&t._handlers.cursorActivity;if(e)for(var r=t.curOp.cursorActivityHandlers||(t.curOp.cursorActivityHandlers=[]),i=0;i<e.length;++i)-1==H(r,e[i])&&r.push(e[i])}function Ct(t,e){return 0<Tt(t,e).length}function St(t){t.prototype.on=function(t,e){xt(this,t,e)},t.prototype.off=function(t,e){kt(this,t,e)}}function At(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function Lt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Nt(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Ot(t){At(t),Lt(t)}function It(t){return t.target||t.srcElement}function Rt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),x&&t.ctrlKey&&1==e&&(e=3),e}var Mt,Dt,Pt=function(){if(T&&k<9)return!1;var t=N("div");return"draggable"in t||"dragDrop"in t}();function Bt(t){if(null==Mt){var e=N("span","");A(t,N("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Mt=e.offsetWidth<=1&&2<e.offsetHeight&&!(T&&k<8))}var r=Mt?N("span",""):N("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Ut(t){if(null!=Dt)return Dt;var e=A(t,document.createTextNode("AخA")),r=E(e,0,1).getBoundingClientRect(),i=E(e,1,2).getBoundingClientRect();return S(t),r&&r.left!=r.right&&(Dt=i.right-r.right<3)}var Ft,Ht=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,r=[],i=t.length;e<=i;){var n=t.indexOf("\n",e);-1==n&&(n=t.length);var o=t.slice(e,"\r"==t.charAt(n-1)?n-1:n),s=o.indexOf("\r");-1!=s?(r.push(o.slice(0,s)),e+=s+1):(r.push(o),e=n+1)}return r}:function(t){return t.split(/\r\n?|\n/)},zt=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},Wt="oncopy"in(Ft=N("div"))||(Ft.setAttribute("oncopy","return;"),"function"==typeof Ft.oncopy),qt=null;var Gt={},jt={};function Vt(t){if("string"==typeof t&&jt.hasOwnProperty(t))t=jt[t];else if(t&&"string"==typeof t.name&&jt.hasOwnProperty(t.name)){var e=jt[t.name];"string"==typeof e&&(e={name:e}),(t=Z(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Vt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Vt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Yt(t,e){e=Vt(e);var r=Gt[e.name];if(!r)return Yt(t,"text/plain");var i=r(t,e);if(Kt.hasOwnProperty(e.name)){var n=Kt[e.name];for(var o in n)n.hasOwnProperty(o)&&(i.hasOwnProperty(o)&&(i["_"+o]=i[o]),i[o]=n[o])}if(i.name=e.name,e.helperType&&(i.helperType=e.helperType),e.modeProps)for(var s in e.modeProps)i[s]=e.modeProps[s];return i}var Kt={};function $t(t,e){B(e,Kt.hasOwnProperty(t)?Kt[t]:Kt[t]={})}function Qt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var r={};for(var i in e){var n=e[i];n instanceof Array&&(n=n.concat([])),r[i]=n}return r}function Xt(t,e){for(var r;t.innerMode&&(r=t.innerMode(e))&&r.mode!=t;)e=r.state,t=r.mode;return r||{mode:t,state:e}}function Zt(t,e,r){return!t.startState||t.startState(e,r)}var Jt=function(t,e,r){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function te(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var r=t;!r.lines;)for(var i=0;;++i){var n=r.children[i],o=n.chunkSize();if(e<o){r=n;break}e-=o}return r.lines[e]}function ee(t,r,i){var n=[],o=r.line;return t.iter(r.line,i.line+1,function(t){var e=t.text;o==i.line&&(e=e.slice(0,i.ch)),o==r.line&&(e=e.slice(r.ch)),n.push(e),++o}),n}function re(t,e,r){var i=[];return t.iter(e,r,function(t){i.push(t.text)}),i}function ie(t,e){var r=e-t.height;if(r)for(var i=t;i;i=i.parent)i.height+=r}function ne(t){if(null==t.parent)return null;for(var e=t.parent,r=H(e.lines,t),i=e.parent;i;i=(e=i).parent)for(var n=0;i.children[n]!=e;++n)r+=i.children[n].chunkSize();return r+e.first}function oe(t,e){var r=t.first;t:do{for(var i=0;i<t.children.length;++i){var n=t.children[i],o=n.height;if(e<o){t=n;continue t}e-=o,r+=n.chunkSize()}return r}while(!t.lines);for(var s=0;s<t.lines.length;++s){var a=t.lines[s].height;if(e<a)break;e-=a}return r+s}function se(t,e){return e>=t.first&&e<t.first+t.size}function ae(t,e){return String(t.lineNumberFormatter(e+t.firstLineNumber))}function le(t,e,r){if(void 0===r&&(r=null),!(this instanceof le))return new le(t,e,r);this.line=t,this.ch=e,this.sticky=r}function he(t,e){return t.line-e.line||t.ch-e.ch}function ce(t,e){return t.sticky==e.sticky&&0==he(t,e)}function ue(t){return le(t.line,t.ch)}function fe(t,e){return he(t,e)<0?e:t}function pe(t,e){return he(t,e)<0?t:e}function de(t,e){return Math.max(t.first,Math.min(e,t.first+t.size-1))}function me(t,e){if(e.line<t.first)return le(t.first,0);var r,i,n,o=t.first+t.size-1;return e.line>o?le(o,te(t,o).text.length):(i=te(t,(r=e).line).text.length,null==(n=r.ch)||i<n?le(r.line,i):n<0?le(r.line,0):r)}function ge(t,e){for(var r=[],i=0;i<e.length;i++)r[i]=me(t,e[i]);return r}Jt.prototype.eol=function(){return this.pos>=this.string.length},Jt.prototype.sol=function(){return this.pos==this.lineStart},Jt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Jt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Jt.prototype.eat=function(t){var e=this.string.charAt(this.pos);if("string"==typeof t?e==t:e&&(t.test?t.test(e):t(e)))return++this.pos,e},Jt.prototype.eatWhile=function(t){for(var e=this.pos;this.eat(t););return this.pos>e},Jt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Jt.prototype.skipToEnd=function(){this.pos=this.string.length},Jt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(-1<e)return this.pos=e,!0},Jt.prototype.backUp=function(t){this.pos-=t},Jt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=U(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?U(this.string,this.lineStart,this.tabSize):0)},Jt.prototype.indentation=function(){return U(this.string,null,this.tabSize)-(this.lineStart?U(this.string,this.lineStart,this.tabSize):0)},Jt.prototype.match=function(t,e,r){if("string"!=typeof t){var i=this.string.slice(this.pos).match(t);return i&&0<i.index?null:(i&&!1!==e&&(this.pos+=i[0].length),i)}function n(t){return r?t.toLowerCase():t}if(n(this.string.substr(this.pos,t.length))==n(t))return!1!==e&&(this.pos+=t.length),!0},Jt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Jt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Jt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Jt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var _e=function(t,e){this.state=t,this.lookAhead=e},ve=function(t,e,r,i){this.state=e,this.doc=t,this.line=r,this.maxLookAhead=i||0,this.baseTokens=null,this.baseTokenPos=1};function ye(e,r,i,t){var l=[e.state.modeGen],n={};Ae(e,r.text,e.doc.mode,i,function(t,e){return l.push(t,e)},n,t);for(var h=i.state,o=function(t){i.baseTokens=l;var o=e.state.overlays[t],s=1,a=0;i.state=!0,Ae(e,r.text,o.mode,i,function(t,e){for(var r=s;a<t;){var i=l[s];t<i&&l.splice(s,1,t,l[s+1],i),s+=2,a=Math.min(t,i)}if(e)if(o.opaque)l.splice(r,s-r,t,"overlay "+e),s=r+2;else for(;r<s;r+=2){var n=l[r+1];l[r+1]=(n?n+" ":"")+"overlay "+e}},n),i.state=h,i.baseTokens=null,i.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)o(s);return{styles:l,classes:n.bgClass||n.textClass?n:null}}function xe(t,e,r){if(!e.styles||e.styles[0]!=t.state.modeGen){var i=Te(t,ne(e)),n=e.text.length>t.options.maxHighlightLength&&Qt(t.doc.mode,i.state),o=ye(t,e,i);n&&(i.state=n),e.stateAfter=i.save(!n),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),r===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function Te(r,i,t){var e=r.doc,n=r.display;if(!e.mode.startState)return new ve(e,!0,i);var o=function(t,e,r){for(var i,n,o=t.doc,s=r?-1:e-(t.doc.mode.innerMode?1e3:100),a=e;s<a;--a){if(a<=o.first)return o.first;var l=te(o,a-1),h=l.stateAfter;if(h&&(!r||a+(h instanceof _e?h.lookAhead:0)<=o.modeFrontier))return a;var c=U(l.text,null,t.options.tabSize);(null==n||c<i)&&(n=a-1,i=c)}return n}(r,i,t),s=o>e.first&&te(e,o-1).stateAfter,a=s?ve.fromSaved(e,s,o):new ve(e,Zt(e.mode),o);return e.iter(o,i,function(t){ke(r,t.text,a);var e=a.line;t.stateAfter=e==i-1||e%5==0||e>=n.viewFrom&&e<n.viewTo?a.save():null,a.nextLine()}),t&&(e.modeFrontier=a.line),a}function ke(t,e,r,i){var n=t.doc.mode,o=new Jt(e,t.options.tabSize,r);for(o.start=o.pos=i||0,""==e&&be(n,r.state);!o.eol();)we(n,o,r.state),o.start=o.pos}function be(t,e){if(t.blankLine)return t.blankLine(e);if(t.innerMode){var r=Xt(t,e);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function we(t,e,r,i){for(var n=0;n<10;n++){i&&(i[0]=Xt(t,r).mode);var o=t.token(e,r);if(e.pos>e.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}ve.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},ve.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},ve.prototype.nextLine=function(){this.line++,0<this.maxLookAhead&&this.maxLookAhead--},ve.fromSaved=function(t,e,r){return e instanceof _e?new ve(t,Qt(t.mode,e.state),r,e.lookAhead):new ve(t,Qt(t.mode,e),r)},ve.prototype.save=function(t){var e=!1!==t?Qt(this.doc.mode,this.state):this.state;return 0<this.maxLookAhead?new _e(e,this.maxLookAhead):e};var Ee=function(t,e,r){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=r};function Ce(t,e,r,i){var n,o,s=t.doc,a=s.mode,l=te(s,(e=me(s,e)).line),h=Te(t,e.line,r),c=new Jt(l.text,t.options.tabSize,h);for(i&&(o=[]);(i||c.pos<e.ch)&&!c.eol();)c.start=c.pos,n=we(a,c,h.state),i&&o.push(new Ee(c,n,Qt(s.mode,h.state)));return i?o:new Ee(c,n,h.state)}function Se(t,e){if(t)for(;;){var r=t.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;t=t.slice(0,r.index)+t.slice(r.index+r[0].length);var i=r[1]?"bgClass":"textClass";null==e[i]?e[i]=r[2]:new RegExp("(?:^|s)"+r[2]+"(?:$|s)").test(e[i])||(e[i]+=" "+r[2])}return t}function Ae(t,e,r,i,n,o,s){var a=r.flattenSpans;null==a&&(a=t.options.flattenSpans);var l,h=0,c=null,u=new Jt(e,t.options.tabSize,i),f=t.options.addModeClass&&[null];for(""==e&&Se(be(r,i.state),o);!u.eol();){if(l=u.pos>t.options.maxHighlightLength?(a=!1,s&&ke(t,e,i,u.pos),u.pos=e.length,null):Se(we(r,u,i.state,f),o),f){var p=f[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!a||c!=l){for(;h<u.start;)n(h=Math.min(u.start,h+5e3),c);c=l}u.start=u.pos}for(;h<u.pos;){var d=Math.min(u.pos,h+5e3);n(d,c),h=d}}var Le=!1,Ne=!1;function Oe(t,e,r){this.marker=t,this.from=e,this.to=r}function Ie(t,e){if(t)for(var r=0;r<t.length;++r){var i=t[r];if(i.marker==e)return i}}function Re(t,e){for(var r,i=0;i<t.length;++i)t[i]!=e&&(r=r||[]).push(t[i]);return r}function Me(t,e){if(e.full)return null;var r=se(t,e.from.line)&&te(t,e.from.line).markedSpans,i=se(t,e.to.line)&&te(t,e.to.line).markedSpans;if(!r&&!i)return null;var n=e.from.ch,o=e.to.ch,s=0==he(e.from,e.to),a=function(t,e,r){var i;if(t)for(var n=0;n<t.length;++n){var o=t[n],s=o.marker;if(null==o.from||(s.inclusiveLeft?o.from<=e:o.from<e)||o.from==e&&"bookmark"==s.type&&(!r||!o.marker.insertLeft)){var a=null==o.to||(s.inclusiveRight?o.to>=e:o.to>e);(i=i||[]).push(new Oe(s,o.from,a?null:o.to))}}return i}(r,n,s),l=function(t,e,r){var i;if(t)for(var n=0;n<t.length;++n){var o=t[n],s=o.marker;if(null==o.to||(s.inclusiveRight?o.to>=e:o.to>e)||o.from==e&&"bookmark"==s.type&&(!r||o.marker.insertLeft)){var a=null==o.from||(s.inclusiveLeft?o.from<=e:o.from<e);(i=i||[]).push(new Oe(s,a?null:o.from-e,null==o.to?null:o.to-e))}}return i}(i,o,s),h=1==e.text.length,c=$(e.text).length+(h?n:0);if(a)for(var u=0;u<a.length;++u){var f=a[u];if(null==f.to){var p=Ie(l,f.marker);p?h&&(f.to=null==p.to?null:p.to+c):f.to=n}}if(l)for(var d=0;d<l.length;++d){var m=l[d];if(null!=m.to&&(m.to+=c),null==m.from)Ie(a,m.marker)||(m.from=c,h&&(a=a||[]).push(m));else m.from+=c,h&&(a=a||[]).push(m)}a=a&&De(a),l&&l!=a&&(l=De(l));var g=[a];if(!h){var _,v=e.text.length-2;if(0<v&&a)for(var y=0;y<a.length;++y)null==a[y].to&&(_=_||[]).push(new Oe(a[y].marker,null,null));for(var x=0;x<v;++x)g.push(_);g.push(l)}return g}function De(t){for(var e=0;e<t.length;++e){var r=t[e];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&t.splice(e--,1)}return t.length?t:null}function Pe(t){var e=t.markedSpans;if(e){for(var r=0;r<e.length;++r)e[r].marker.detachLine(t);t.markedSpans=null}}function Be(t,e){if(e){for(var r=0;r<e.length;++r)e[r].marker.attachLine(t);t.markedSpans=e}}function Ue(t){return t.inclusiveLeft?-1:0}function Fe(t){return t.inclusiveRight?1:0}function He(t,e){var r=t.lines.length-e.lines.length;if(0!=r)return r;var i=t.find(),n=e.find(),o=he(i.from,n.from)||Ue(t)-Ue(e);if(o)return-o;var s=he(i.to,n.to)||Fe(t)-Fe(e);return s||e.id-t.id}function ze(t,e){var r,i=Ne&&t.markedSpans;if(i)for(var n=void 0,o=0;o<i.length;++o)(n=i[o]).marker.collapsed&&null==(e?n.from:n.to)&&(!r||He(r,n.marker)<0)&&(r=n.marker);return r}function We(t){return ze(t,!0)}function qe(t){return ze(t,!1)}function Ge(t,e){var r,i=Ne&&t.markedSpans;if(i)for(var n=0;n<i.length;++n){var o=i[n];o.marker.collapsed&&(null==o.from||o.from<e)&&(null==o.to||o.to>e)&&(!r||He(r,o.marker)<0)&&(r=o.marker)}return r}function je(t,e,r,i,n){var o=te(t,e),s=Ne&&o.markedSpans;if(s)for(var a=0;a<s.length;++a){var l=s[a];if(l.marker.collapsed){var h=l.marker.find(0),c=he(h.from,r)||Ue(l.marker)-Ue(n),u=he(h.to,i)||Fe(l.marker)-Fe(n);if(!(0<=c&&u<=0||c<=0&&0<=u)&&(c<=0&&(l.marker.inclusiveRight&&n.inclusiveLeft?0<=he(h.to,r):0<he(h.to,r))||0<=c&&(l.marker.inclusiveRight&&n.inclusiveLeft?he(h.from,i)<=0:he(h.from,i)<0)))return 1}}}function Ve(t){for(var e;e=We(t);)t=e.find(-1,!0).line;return t}function Ye(t,e){var r=te(t,e),i=Ve(r);return r==i?e:ne(i)}function Ke(t,e){if(e>t.lastLine())return e;var r,i=te(t,e);if(!$e(t,i))return e;for(;r=qe(i);)i=r.find(1,!0).line;return ne(i)+1}function $e(t,e){var r=Ne&&e.markedSpans;if(r)for(var i=void 0,n=0;n<r.length;++n)if((i=r[n]).marker.collapsed){if(null==i.from)return!0;if(!i.marker.widgetNode&&0==i.from&&i.marker.inclusiveLeft&&Qe(t,e,i))return!0}}function Qe(t,e,r){if(null==r.to){var i=r.marker.find(1,!0);return Qe(t,i.line,Ie(i.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==e.text.length)return!0;for(var n=void 0,o=0;o<e.markedSpans.length;++o)if((n=e.markedSpans[o]).marker.collapsed&&!n.marker.widgetNode&&n.from==r.to&&(null==n.to||n.to!=r.from)&&(n.marker.inclusiveLeft||r.marker.inclusiveRight)&&Qe(t,e,n))return!0}function Xe(t){for(var e=0,r=(t=Ve(t)).parent,i=0;i<r.lines.length;++i){var n=r.lines[i];if(n==t)break;e+=n.height}for(var o=r.parent;o;o=(r=o).parent)for(var s=0;s<o.children.length;++s){var a=o.children[s];if(a==r)break;e+=a.height}return e}function Ze(t){if(0==t.height)return 0;for(var e,r=t.text.length,i=t;e=We(i);){var n=e.find(0,!0);i=n.from.line,r+=n.from.ch-n.to.ch}for(i=t;e=qe(i);){var o=e.find(0,!0);r-=i.text.length-o.from.ch,r+=(i=o.to.line).text.length-o.to.ch}return r}function Je(t){var r=t.display,e=t.doc;r.maxLine=te(e,e.first),r.maxLineLength=Ze(r.maxLine),r.maxLineChanged=!0,e.iter(function(t){var e=Ze(t);e>r.maxLineLength&&(r.maxLineLength=e,r.maxLine=t)})}var tr=function(t,e,r){this.text=t,Be(this,e),this.height=r?r(this):1};tr.prototype.lineNo=function(){return ne(this)},St(tr);var er={},rr={};function ir(t,e){if(!t||/^\s*$/.test(t))return null;var r=e.addModeClass?rr:er;return r[t]||(r[t]=t.replace(/\S+/g,"cm-$&"))}function nr(t,e){var r=L("span",null,null,y?"padding-right: .1px":null),i={pre:L("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var n=0;n<=(e.rest?e.rest.length:0);n++){var o=n?e.rest[n-1]:e.line,s=void 0;i.pos=0,i.addToken=sr,Ut(t.display.measure)&&(s=vt(o,t.doc.direction))&&(i.addToken=ar(i.addToken,s)),i.map=[],hr(o,i,xe(t,o,e!=t.display.externalMeasured&&ne(o))),o.styleClasses&&(o.styleClasses.bgClass&&(i.bgClass=M(o.styleClasses.bgClass,i.bgClass||"")),o.styleClasses.textClass&&(i.textClass=M(o.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(Bt(t.display.measure))),0==n?(e.measure.map=i.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(i.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(y){var a=i.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return bt(t,"renderLine",t,e.line,i.pre),i.pre.className&&(i.textClass=M(i.pre.className,i.textClass||"")),i}function or(t){var e=N("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function sr(t,e,r,i,n,o,s){if(e){var a,l=t.splitSpaces?function(t,e){if(1<t.length&&!/ /.test(t))return t;for(var r=e,i="",n=0;n<t.length;n++){var o=t.charAt(n);" "!=o||!r||n!=t.length-1&&32!=t.charCodeAt(n+1)||(o=" "),i+=o,r=" "==o}return i}(e,t.trailingSpace):e,h=t.cm.state.specialChars,c=!1;if(h.test(e)){a=document.createDocumentFragment();for(var u=0;;){h.lastIndex=u;var f=h.exec(e),p=f?f.index-u:e.length-u;if(p){var d=document.createTextNode(l.slice(u,u+p));T&&k<9?a.appendChild(N("span",[d])):a.appendChild(d),t.map.push(t.pos,t.pos+p,d),t.col+=p,t.pos+=p}if(!f)break;u+=1+p;var m=void 0;if("\t"==f[0]){var g=t.cm.options.tabSize,_=g-t.col%g;(m=a.appendChild(N("span",K(_),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),t.col+=_}else"\r"==f[0]||"\n"==f[0]?(m=a.appendChild(N("span","\r"==f[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",f[0]):((m=t.cm.options.specialCharPlaceholder(f[0])).setAttribute("cm-text",f[0]),T&&k<9?a.appendChild(N("span",[m])):a.appendChild(m)),t.col+=1;t.map.push(t.pos,t.pos+1,m),t.pos++}}else t.col+=e.length,a=document.createTextNode(l),t.map.push(t.pos,t.pos+e.length,a),T&&k<9&&(c=!0),t.pos+=e.length;if(t.trailingSpace=32==l.charCodeAt(e.length-1),r||i||n||c||o){var v=r||"";i&&(v+=i),n&&(v+=n);var y=N("span",[a],v,o);if(s)for(var x in s)s.hasOwnProperty(x)&&"style"!=x&&"class"!=x&&y.setAttribute(x,s[x]);return t.content.appendChild(y)}t.content.appendChild(a)}}function ar(u,f){return function(t,e,r,i,n,o,s){r=r?r+" cm-force-border":"cm-force-border";for(var a=t.pos,l=a+e.length;;){for(var h=void 0,c=0;c<f.length&&!((h=f[c]).to>a&&h.from<=a);c++);if(h.to>=l)return u(t,e,r,i,n,o,s);u(t,e.slice(0,h.to-a),r,i,null,o,s),i=null,e=e.slice(h.to-a),a=h.to}}}function lr(t,e,r,i){var n=!i&&r.widgetNode;n&&t.map.push(t.pos,t.pos+e,n),!i&&t.cm.display.input.needsContentAttribute&&(n=n||t.content.appendChild(document.createElement("span"))).setAttribute("cm-marker",r.id),n&&(t.cm.display.input.setUneditable(n),t.content.appendChild(n)),t.pos+=e,t.trailingSpace=!1}function hr(t,e,r){var i=t.markedSpans,n=t.text,o=0;if(i)for(var s,a,l,h,c,u,f,p=n.length,d=0,m=1,g="",_=0;;){if(_==d){l=h=c=a="",u=f=null,_=1/0;for(var v=[],y=void 0,x=0;x<i.length;++x){var T=i[x],k=T.marker;if("bookmark"==k.type&&T.from==d&&k.widgetNode)v.push(k);else if(T.from<=d&&(null==T.to||T.to>d||k.collapsed&&T.to==d&&T.from==d)){if(null!=T.to&&T.to!=d&&_>T.to&&(_=T.to,h=""),k.className&&(l+=" "+k.className),k.css&&(a=(a?a+";":"")+k.css),k.startStyle&&T.from==d&&(c+=" "+k.startStyle),k.endStyle&&T.to==_&&(y=y||[]).push(k.endStyle,T.to),k.title&&((f=f||{}).title=k.title),k.attributes)for(var b in k.attributes)(f=f||{})[b]=k.attributes[b];k.collapsed&&(!u||He(u.marker,k)<0)&&(u=T)}else T.from>d&&_>T.from&&(_=T.from)}if(y)for(var w=0;w<y.length;w+=2)y[w+1]==_&&(h+=" "+y[w]);if(!u||u.from==d)for(var E=0;E<v.length;++E)lr(e,0,v[E]);if(u&&(u.from||0)==d){if(lr(e,(null==u.to?p+1:u.to)-d,u.marker,null==u.from),null==u.to)return;u.to==d&&(u=!1)}}if(p<=d)break;for(var C=Math.min(p,_);;){if(g){var S=d+g.length;if(!u){var A=C<S?g.slice(0,C-d):g;e.addToken(e,A,s?s+l:l,c,d+A.length==_?h:"",a,f)}if(C<=S){g=g.slice(C-d),d=C;break}d=S,c=""}g=n.slice(o,o=r[m++]),s=ir(r[m++],e.cm.options)}}else for(var L=1;L<r.length;L+=2)e.addToken(e,n.slice(o,o=r[L]),ir(r[L+1],e.cm.options))}function cr(t,e,r){this.line=e,this.rest=function(t){for(var e,r;e=qe(t);)t=e.find(1,!0).line,(r=r||[]).push(t);return r}(e),this.size=this.rest?ne($(this.rest))-r+1:1,this.node=this.text=null,this.hidden=$e(t,e)}function ur(t,e,r){for(var i,n=[],o=e;o<r;o=i){var s=new cr(t.doc,te(t.doc,o),o);i=o+s.size,n.push(s)}return n}var fr=null;function pr(t,e){var r=t.ownsGroup;if(r)try{!function(t){var e=t.delayedCallbacks,r=0;do{for(;r<e.length;r++)e[r].call(null);for(var i=0;i<t.ops.length;i++){var n=t.ops[i];if(n.cursorActivityHandlers)for(;n.cursorActivityCalled<n.cursorActivityHandlers.length;)n.cursorActivityHandlers[n.cursorActivityCalled++].call(null,n.cm)}}while(r<e.length)}(r)}finally{fr=null,e(r)}}var dr=null;function mr(t,e){var r=Tt(t,e);if(r.length){var i,n=Array.prototype.slice.call(arguments,2);fr?i=fr.delayedCallbacks:dr?i=dr:(i=dr=[],setTimeout(gr,0));for(var o=function(t){i.push(function(){return r[t].apply(null,n)})},s=0;s<r.length;++s)o(s)}}function gr(){var t=dr;dr=null;for(var e=0;e<t.length;++e)t[e]()}function _r(t,e,r,i){for(var n=0;n<e.changes.length;n++){var o=e.changes[n];"text"==o?xr(t,e):"gutter"==o?kr(t,e,r,i):"class"==o?Tr(t,e):"widget"==o&&br(t,e,i)}e.changes=null}function vr(t){return t.node==t.text&&(t.node=N("div",null,null,"position: relative"),t.text.parentNode&&t.text.parentNode.replaceChild(t.node,t.text),t.node.appendChild(t.text),T&&k<8&&(t.node.style.zIndex=2)),t.node}function yr(t,e){var r=t.display.externalMeasured;return r&&r.line==e.line?(t.display.externalMeasured=null,e.measure=r.measure,r.built):nr(t,e)}function xr(t,e){var r=e.text.className,i=yr(t,e);e.text==e.node&&(e.node=i.pre),e.text.parentNode.replaceChild(i.pre,e.text),e.text=i.pre,i.bgClass!=e.bgClass||i.textClass!=e.textClass?(e.bgClass=i.bgClass,e.textClass=i.textClass,Tr(t,e)):r&&(e.text.className=r)}function Tr(t,e){!function(t,e){var r=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),e.background)r?e.background.className=r:(e.background.parentNode.removeChild(e.background),e.background=null);else if(r){var i=vr(e);e.background=i.insertBefore(N("div",null,r),i.firstChild),t.display.input.setUneditable(e.background)}}(t,e),e.line.wrapClass?vr(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var r=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=r||""}function kr(t,e,r,i){if(e.gutter&&(e.node.removeChild(e.gutter),e.gutter=null),e.gutterBackground&&(e.node.removeChild(e.gutterBackground),e.gutterBackground=null),e.line.gutterClass){var n=vr(e);e.gutterBackground=N("div",null,"CodeMirror-gutter-background "+e.line.gutterClass,"left: "+(t.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),t.display.input.setUneditable(e.gutterBackground),n.insertBefore(e.gutterBackground,e.text)}var o=e.line.gutterMarkers;if(t.options.lineNumbers||o){var s=vr(e),a=e.gutter=N("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(t.display.input.setUneditable(a),s.insertBefore(a,e.text),e.line.gutterClass&&(a.className+=" "+e.line.gutterClass),!t.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(e.lineNumber=a.appendChild(N("div",ae(t.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<t.display.gutterSpecs.length;++l){var h=t.display.gutterSpecs[l].className,c=o.hasOwnProperty(h)&&o[h];c&&a.appendChild(N("div",[c],"CodeMirror-gutter-elt","left: "+i.gutterLeft[h]+"px; width: "+i.gutterWidth[h]+"px"))}}}function br(t,e,r){e.alignable&&(e.alignable=null);for(var i=w("CodeMirror-linewidget"),n=e.node.firstChild,o=void 0;n;n=o)o=n.nextSibling,i.test(n.className)&&e.node.removeChild(n);wr(t,e,r)}function wr(t,e,r){if(Er(t,e.line,e,r,!0),e.rest)for(var i=0;i<e.rest.length;i++)Er(t,e.rest[i],e,r,!1)}function Er(t,e,r,i,n){if(e.widgets)for(var o=vr(r),s=0,a=e.widgets;s<a.length;++s){var l=a[s],h=N("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||h.setAttribute("cm-ignore-events","true"),Cr(l,h,r,i),t.display.input.setUneditable(h),n&&l.above?o.insertBefore(h,r.gutter||r.text):o.appendChild(h),mr(l,"redraw")}}function Cr(t,e,r,i){if(t.noHScroll){(r.alignable||(r.alignable=[])).push(e);var n=i.wrapperWidth;e.style.left=i.fixedPos+"px",t.coverGutter||(n-=i.gutterTotalWidth,e.style.paddingLeft=i.gutterTotalWidth+"px"),e.style.width=n+"px"}t.coverGutter&&(e.style.zIndex=5,e.style.position="relative",t.noHScroll||(e.style.marginLeft=-i.gutterTotalWidth+"px"))}function Sr(t){if(null!=t.height)return t.height;var e=t.doc.cm;if(!e)return 0;if(!O(document.body,t.node)){var r="position: relative;";t.coverGutter&&(r+="margin-left: -"+e.display.gutters.offsetWidth+"px;"),t.noHScroll&&(r+="width: "+e.display.wrapper.clientWidth+"px;"),A(e.display.measure,N("div",[t.node],null,r))}return t.height=t.node.parentNode.offsetHeight}function Ar(t,e){for(var r=It(e);r!=t.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==t.sizer&&r!=t.mover)return 1}function Lr(t){return t.lineSpace.offsetTop}function Nr(t){return t.mover.offsetHeight-t.lineSpace.offsetHeight}function Or(t){if(t.cachedPaddingH)return t.cachedPaddingH;var e=A(t.measure,N("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,i={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(i.left)||isNaN(i.right)||(t.cachedPaddingH=i),i}function Ir(t){return z-t.display.nativeBarWidth}function Rr(t){return t.display.scroller.clientWidth-Ir(t)-t.display.barWidth}function Mr(t){return t.display.scroller.clientHeight-Ir(t)-t.display.barHeight}function Dr(t,e,r){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var i=0;i<t.rest.length;i++)if(t.rest[i]==e)return{map:t.measure.maps[i],cache:t.measure.caches[i]};for(var n=0;n<t.rest.length;n++)if(ne(t.rest[n])>r)return{map:t.measure.maps[n],cache:t.measure.caches[n],before:!0}}function Pr(t,e,r,i){return Fr(t,Ur(t,e),r,i)}function Br(t,e){if(e>=t.display.viewFrom&&e<t.display.viewTo)return t.display.view[di(t,e)];var r=t.display.externalMeasured;return r&&e>=r.lineN&&e<r.lineN+r.size?r:void 0}function Ur(t,e){var r=ne(e),i=Br(t,r);i&&!i.text?i=null:i&&i.changes&&(_r(t,i,r,hi(t)),t.curOp.forceUpdate=!0);var n=Dr(i=i||function(t,e){var r=ne(e=Ve(e)),i=t.display.externalMeasured=new cr(t.doc,e,r);i.lineN=r;var n=i.built=nr(t,i);return i.text=n.pre,A(t.display.lineMeasure,n.pre),i}(t,e),e,r);return{line:e,view:i,rect:null,map:n.map,cache:n.cache,before:n.before,hasHeights:!1}}function Fr(t,e,r,i,n){e.before&&(r=-1);var o,s=r+(i||"");return e.cache.hasOwnProperty(s)?o=e.cache[s]:(e.rect||(e.rect=e.view.text.getBoundingClientRect()),e.hasHeights||(function(t,e,r){var i=t.options.lineWrapping,n=i&&Rr(t);if(!e.measure.heights||i&&e.measure.width!=n){var o=e.measure.heights=[];if(i){e.measure.width=n;for(var s=e.text.firstChild.getClientRects(),a=0;a<s.length-1;a++){var l=s[a],h=s[a+1];2<Math.abs(l.bottom-h.bottom)&&o.push((l.bottom+h.top)/2-r.top)}}o.push(r.bottom-r.top)}}(t,e.view,e.rect),e.hasHeights=!0),(o=function(t,e,r,i){var n,o=Wr(e.map,r,i),s=o.node,a=o.start,l=o.end,h=o.collapse;if(3==s.nodeType){for(var c=0;c<4;c++){for(;a&&nt(e.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+l<o.coverEnd&&nt(e.line.text.charAt(o.coverStart+l));)++l;if((n=T&&k<9&&0==a&&l==o.coverEnd-o.coverStart?s.parentNode.getBoundingClientRect():qr(E(s,a,l).getClientRects(),i)).left||n.right||0==a)break;l=a,--a,h="right"}T&&k<11&&(n=function(t,e){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(t){if(null!=qt)return qt;var e=A(t,N("span","x")),r=e.getBoundingClientRect(),i=E(e,0,1).getBoundingClientRect();return qt=1<Math.abs(r.left-i.left)}(t))return e;var r=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*r,right:e.right*r,top:e.top*i,bottom:e.bottom*i}}(t.display.measure,n))}else{var u;0<a&&(h=i="right"),n=t.options.lineWrapping&&1<(u=s.getClientRects()).length?u["right"==i?u.length-1:0]:s.getBoundingClientRect()}if(T&&k<9&&!a&&(!n||!n.left&&!n.right)){var f=s.parentNode.getClientRects()[0];n=f?{left:f.left,right:f.left+li(t.display),top:f.top,bottom:f.bottom}:zr}for(var p=n.top-e.rect.top,d=n.bottom-e.rect.top,m=(p+d)/2,g=e.view.measure.heights,_=0;_<g.length-1&&!(m<g[_]);_++);var v=_?g[_-1]:0,y=g[_],x={left:("right"==h?n.right:n.left)-e.rect.left,right:("left"==h?n.left:n.right)-e.rect.left,top:v,bottom:y};n.left||n.right||(x.bogus=!0);t.options.singleCursorHeightPerLine||(x.rtop=p,x.rbottom=d);return x}(t,e,r,i)).bogus||(e.cache[s]=o)),{left:o.left,right:o.right,top:n?o.rtop:o.top,bottom:n?o.rbottom:o.bottom}}var Hr,zr={left:0,right:0,top:0,bottom:0};function Wr(t,e,r){for(var i,n,o,s,a,l,h=0;h<t.length;h+=3)if(a=t[h],l=t[h+1],e<a?(n=0,o=1,s="left"):e<l?o=(n=e-a)+1:(h==t.length-3||e==l&&t[h+3]>e)&&(n=(o=l-a)-1,l<=e&&(s="right")),null!=n){if(i=t[h+2],a==l&&r==(i.insertLeft?"left":"right")&&(s=r),"left"==r&&0==n)for(;h&&t[h-2]==t[h-3]&&t[h-1].insertLeft;)i=t[2+(h-=3)],s="left";if("right"==r&&n==l-a)for(;h<t.length-3&&t[h+3]==t[h+4]&&!t[h+5].insertLeft;)i=t[(h+=3)+2],s="right";break}return{node:i,start:n,end:o,collapse:s,coverStart:a,coverEnd:l}}function qr(t,e){var r=zr;if("left"==e)for(var i=0;i<t.length&&(r=t[i]).left==r.right;i++);else for(var n=t.length-1;0<=n&&(r=t[n]).left==r.right;n--);return r}function Gr(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e<t.rest.length;e++)t.measure.caches[e]={}}function jr(t){t.display.externalMeasure=null,S(t.display.lineMeasure);for(var e=0;e<t.display.view.length;e++)Gr(t.display.view[e])}function Vr(t){jr(t),t.display.cachedCharWidth=t.display.cachedTextHeight=t.display.cachedPaddingH=null,t.options.lineWrapping||(t.display.maxLineChanged=!0),t.display.lineNumChars=null}function Yr(){return s&&u?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Kr(){return s&&u?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function $r(t){var e=0;if(t.widgets)for(var r=0;r<t.widgets.length;++r)t.widgets[r].above&&(e+=Sr(t.widgets[r]));return e}function Qr(t,e,r,i,n){if(!n){var o=$r(e);r.top+=o,r.bottom+=o}if("line"==i)return r;i=i||"local";var s=Xe(e);if("local"==i?s+=Lr(t.display):s-=t.display.viewOffset,"page"==i||"window"==i){var a=t.display.lineSpace.getBoundingClientRect();s+=a.top+("window"==i?0:Kr());var l=a.left+("window"==i?0:Yr());r.left+=l,r.right+=l}return r.top+=s,r.bottom+=s,r}function Xr(t,e,r){if("div"==r)return e;var i=e.left,n=e.top;if("page"==r)i-=Yr(),n-=Kr();else if("local"==r||!r){var o=t.display.sizer.getBoundingClientRect();i+=o.left,n+=o.top}var s=t.display.lineSpace.getBoundingClientRect();return{left:i-s.left,top:n-s.top}}function Zr(t,e,r,i,n){return Qr(t,i=i||te(t.doc,e.line),Pr(t,i,e.ch,n),r)}function Jr(i,t,n,o,s,a){function l(t,e){var r=Fr(i,s,t,e?"right":"left",a);return e?r.left=r.right:r.right=r.left,Qr(i,o,r,n)}o=o||te(i.doc,t.line),s=s||Ur(i,o);var h=vt(o,i.doc.direction),e=t.ch,r=t.sticky;if(e>=o.text.length?(e=o.text.length,r="before"):e<=0&&(e=0,r="after"),!h)return l("before"==r?e-1:e,"before"==r);function c(t,e,r){return l(r?t-1:t,1==h[e].level!=r)}var u=lt(h,e,r),f=at,p=c(e,u,"before"==r);return null!=f&&(p.other=c(e,f,"before"!=r)),p}function ti(t,e){var r=0;e=me(t.doc,e),t.options.lineWrapping||(r=li(t.display)*e.ch);var i=te(t.doc,e.line),n=Xe(i)+Lr(t.display);return{left:r,right:r,top:n,bottom:n+i.height}}function ei(t,e,r,i,n){var o=le(t,e,r);return o.xRel=n,i&&(o.outside=i),o}function ri(t,e,r){var i=t.doc;if((r+=t.display.viewOffset)<0)return ei(i.first,0,null,-1,-1);var n=oe(i,r),o=i.first+i.size-1;if(o<n)return ei(i.first+i.size-1,te(i,o).text.length,null,1,1);e<0&&(e=0);for(var s=te(i,n);;){var a=si(t,s,n,e,r),l=Ge(s,a.ch+(0<a.xRel||0<a.outside?1:0));if(!l)return a;var h=l.find(1);if(h.line==n)return h;s=te(i,n=h.line)}}function ii(e,t,r,i){i-=$r(t);var n=t.text.length,o=st(function(t){return Fr(e,r,t-1).bottom<=i},n,0);return{begin:o,end:n=st(function(t){return Fr(e,r,t).top>i},o,n)}}function ni(t,e,r,i){return ii(t,e,r=r||Ur(t,e),Qr(t,e,Fr(t,r,i),"line").top)}function oi(t,e,r,i){return!(t.bottom<=r)&&(t.top>r||(i?t.left:t.right)>e)}function si(r,t,e,i,n){n-=Xe(t);var o=Ur(r,t),s=$r(t),a=0,l=t.text.length,h=!0,c=vt(t,r.doc.direction);if(c){var u=(r.options.lineWrapping?function(t,e,r,i,n,o,s){var a=ii(t,e,i,s),l=a.begin,h=a.end;/\s/.test(e.text.charAt(h-1))&&h--;for(var c=null,u=null,f=0;f<n.length;f++){var p=n[f];if(!(p.from>=h||p.to<=l)){var d=1!=p.level,m=Fr(t,i,d?Math.min(h,p.to)-1:Math.max(l,p.from)).right,g=m<o?o-m+1e9:m-o;(!c||g<u)&&(c=p,u=g)}}c=c||n[n.length-1];c.from<l&&(c={from:l,to:c.to,level:c.level});c.to>h&&(c={from:c.from,to:h,level:c.level});return c}:function(i,n,o,s,a,l,h){var t=st(function(t){var e=a[t],r=1!=e.level;return oi(Jr(i,le(o,r?e.to:e.from,r?"before":"after"),"line",n,s),l,h,!0)},0,a.length-1),e=a[t];if(0<t){var r=1!=e.level,c=Jr(i,le(o,r?e.from:e.to,r?"after":"before"),"line",n,s);oi(c,l,h,!0)&&c.top>h&&(e=a[t-1])}return e})(r,t,e,o,c,i,n);a=(h=1!=u.level)?u.from:u.to-1,l=h?u.to:u.from-1}var f,p,d=null,m=null,g=st(function(t){var e=Fr(r,o,t);return e.top+=s,e.bottom+=s,oi(e,i,n,!1)&&(e.top<=n&&e.left<=i&&(d=t,m=e),1)},a,l),_=!1;if(m){var v=i-m.left<m.right-i,y=v==h;g=d+(y?0:1),p=y?"after":"before",f=v?m.left:m.right}else{h||g!=l&&g!=a||g++,p=0==g?"after":g==t.text.length?"before":Fr(r,o,g-(h?1:0)).bottom+s<=n==h?"after":"before";var x=Jr(r,le(e,g,p),"line",t,o);f=x.left,_=n<x.top?-1:n>=x.bottom?1:0}return ei(e,g=ot(t.text,g,1),p,_,i-f)}function ai(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==Hr){Hr=N("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)Hr.appendChild(document.createTextNode("x")),Hr.appendChild(N("br"));Hr.appendChild(document.createTextNode("x"))}A(t.measure,Hr);var r=Hr.offsetHeight/50;return 3<r&&(t.cachedTextHeight=r),S(t.measure),r||1}function li(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=N("span","xxxxxxxxxx"),r=N("pre",[e],"CodeMirror-line-like");A(t.measure,r);var i=e.getBoundingClientRect(),n=(i.right-i.left)/10;return 2<n&&(t.cachedCharWidth=n),n||10}function hi(t){for(var e=t.display,r={},i={},n=e.gutters.clientLeft,o=e.gutters.firstChild,s=0;o;o=o.nextSibling,++s){var a=t.display.gutterSpecs[s].className;r[a]=o.offsetLeft+o.clientLeft+n,i[a]=o.clientWidth}return{fixedPos:ci(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:r,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function ci(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function ui(i){var n=ai(i.display),o=i.options.lineWrapping,s=o&&Math.max(5,i.display.scroller.clientWidth/li(i.display)-3);return function(t){if($e(i.doc,t))return 0;var e=0;if(t.widgets)for(var r=0;r<t.widgets.length;r++)t.widgets[r].height&&(e+=t.widgets[r].height);return o?e+(Math.ceil(t.text.length/s)||1)*n:e+n}}function fi(t){var e=t.doc,r=ui(t);e.iter(function(t){var e=r(t);e!=t.height&&ie(t,e)})}function pi(t,e,r,i){var n=t.display;if(!r&&"true"==It(e).getAttribute("cm-not-content"))return null;var o,s,a=n.lineSpace.getBoundingClientRect();try{o=e.clientX-a.left,s=e.clientY-a.top}catch(e){return null}var l,h=ri(t,o,s);if(i&&0<h.xRel&&(l=te(t.doc,h.line).text).length==h.ch){var c=U(l,l.length,t.options.tabSize)-l.length;h=le(h.line,Math.max(0,Math.round((o-Or(t.display).left)/li(t.display))-c))}return h}function di(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var r=t.display.view,i=0;i<r.length;i++)if((e-=r[i].size)<0)return i}function mi(t,e,r,i){null==e&&(e=t.doc.first),null==r&&(r=t.doc.first+t.doc.size),i=i||0;var n=t.display;if(i&&r<n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>e)&&(n.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=n.viewTo)Ne&&Ye(t.doc,e)<n.viewTo&&_i(t);else if(r<=n.viewFrom)Ne&&Ke(t.doc,r+i)>n.viewFrom?_i(t):(n.viewFrom+=i,n.viewTo+=i);else if(e<=n.viewFrom&&r>=n.viewTo)_i(t);else if(e<=n.viewFrom){var o=vi(t,r,r+i,1);o?(n.view=n.view.slice(o.index),n.viewFrom=o.lineN,n.viewTo+=i):_i(t)}else if(r>=n.viewTo){var s=vi(t,e,e,-1);s?(n.view=n.view.slice(0,s.index),n.viewTo=s.lineN):_i(t)}else{var a=vi(t,e,e,-1),l=vi(t,r,r+i,1);a&&l?(n.view=n.view.slice(0,a.index).concat(ur(t,a.lineN,l.lineN)).concat(n.view.slice(l.index)),n.viewTo+=i):_i(t)}var h=n.externalMeasured;h&&(r<h.lineN?h.lineN+=i:e<h.lineN+h.size&&(n.externalMeasured=null))}function gi(t,e,r){t.curOp.viewChanged=!0;var i=t.display,n=t.display.externalMeasured;if(n&&e>=n.lineN&&e<n.lineN+n.size&&(i.externalMeasured=null),!(e<i.viewFrom||e>=i.viewTo)){var o=i.view[di(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==H(s,r)&&s.push(r)}}}function _i(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function vi(t,e,r,i){var n,o=di(t,e),s=t.display.view;if(!Ne||r==t.doc.first+t.doc.size)return{index:o,lineN:r};for(var a=t.display.viewFrom,l=0;l<o;l++)a+=s[l].size;if(a!=e){if(0<i){if(o==s.length-1)return null;n=a+s[o].size-e,o++}else n=a-e;e+=n,r+=n}for(;Ye(t.doc,r)!=r;){if(o==(i<0?0:s.length-1))return null;r+=i*s[o-(i<0?1:0)].size,o+=i}return{index:o,lineN:r}}function yi(t){for(var e=t.display.view,r=0,i=0;i<e.length;i++){var n=e[i];n.hidden||n.node&&!n.changes||++r}return r}function xi(t){t.display.input.showSelection(t.display.input.prepareSelection())}function Ti(t,e){void 0===e&&(e=!0);for(var r=t.doc,i={},n=i.cursors=document.createDocumentFragment(),o=i.selection=document.createDocumentFragment(),s=0;s<r.sel.ranges.length;s++)if(e||s!=r.sel.primIndex){var a=r.sel.ranges[s];if(!(a.from().line>=t.display.viewTo||a.to().line<t.display.viewFrom)){var l=a.empty();(l||t.options.showCursorWhenSelecting)&&ki(t,a.head,n),l||wi(t,a,o)}}return i}function ki(t,e,r){var i=Jr(t,e,"div",null,null,!t.options.singleCursorHeightPerLine),n=r.appendChild(N("div"," ","CodeMirror-cursor"));if(n.style.left=i.left+"px",n.style.top=i.top+"px",n.style.height=Math.max(0,i.bottom-i.top)*t.options.cursorHeight+"px",i.other){var o=r.appendChild(N("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=i.other.left+"px",o.style.top=i.other.top+"px",o.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function bi(t,e){return t.top-e.top||t.left-e.left}function wi(s,t,e){var r=s.display,i=s.doc,n=document.createDocumentFragment(),o=Or(s.display),C=o.left,S=Math.max(r.sizerWidth,Rr(s)-r.sizer.offsetLeft)-o.right,A="ltr"==i.direction;function L(t,e,r,i){e<0&&(e=0),e=Math.round(e),i=Math.round(i),n.appendChild(N("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px;\n top: "+e+"px; width: "+(null==r?S-t:r)+"px;\n height: "+(i-e)+"px"))}function a(r,v,y){var x,T,o=te(i,r),k=o.text.length;function b(t,e){return Zr(s,le(r,t),"div",o,e)}function w(t,e,r){var i=ni(s,o,null,t),n="ltr"==e==("after"==r)?"left":"right";return b("after"==r?i.begin:i.end-(/\s/.test(o.text.charAt(i.end-1))?2:1),n)[n]}var E=vt(o,i.direction);return function(t,e,r,i){if(!t)return i(e,r,"ltr",0);for(var n=!1,o=0;o<t.length;++o){var s=t[o];(s.from<r&&s.to>e||e==r&&s.to==e)&&(i(Math.max(s.from,e),Math.min(s.to,r),1==s.level?"rtl":"ltr",o),n=!0)}n||i(e,r,"ltr")}(E,v||0,null==y?k:y,function(t,e,r,i){var n="ltr"==r,o=b(t,n?"left":"right"),s=b(e-1,n?"right":"left"),a=null==v&&0==t,l=null==y&&e==k,h=0==i,c=!E||i==E.length-1;if(s.top-o.top<=3){var u=(A?l:a)&&c,f=(A?a:l)&&h?C:(n?o:s).left,p=u?S:(n?s:o).right;L(f,o.top,p-f,o.bottom)}else{var d,m,g,_;_=n?(d=A&&a&&h?C:o.left,m=A?S:w(t,r,"before"),g=A?C:w(e,r,"after"),A&&l&&c?S:s.right):(d=A?w(t,r,"before"):C,m=!A&&a&&h?S:o.right,g=!A&&l&&c?C:s.left,A?w(e,r,"after"):S),L(d,o.top,m-d,o.bottom),o.bottom<s.top&&L(C,o.bottom,null,s.top),L(g,s.top,_-g,s.bottom)}(!x||bi(o,x)<0)&&(x=o),bi(s,x)<0&&(x=s),(!T||bi(o,T)<0)&&(T=o),bi(s,T)<0&&(T=s)}),{start:x,end:T}}var l=t.from(),h=t.to();if(l.line==h.line)a(l.line,l.ch,h.ch);else{var c=te(i,l.line),u=te(i,h.line),f=Ve(c)==Ve(u),p=a(l.line,l.ch,f?c.text.length+1:null).end,d=a(h.line,f?0:null,h.ch).start;f&&(p.top<d.top-2?(L(p.right,p.top,null,p.bottom),L(C,d.top,d.left,d.bottom)):L(p.right,p.top,d.left-p.right,p.bottom)),p.bottom<d.top&&L(C,p.bottom,null,d.top)}e.appendChild(n)}function Ei(t){if(t.state.focused){var e=t.display;clearInterval(e.blinker);var r=!0;e.cursorDiv.style.visibility="",0<t.options.cursorBlinkRate?e.blinker=setInterval(function(){return e.cursorDiv.style.visibility=(r=!r)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Ci(t){t.state.focused||(t.display.input.focus(),Ai(t))}function Si(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,Li(t))},100)}function Ai(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(bt(t,"focus",t,e),t.state.focused=!0,R(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),y&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Ei(t))}function Li(t,e){t.state.delayingBlurEvent||(t.state.focused&&(bt(t,"blur",t,e),t.state.focused=!1,C(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function Ni(t){for(var e=t.display,r=e.lineDiv.offsetTop,i=0;i<e.view.length;i++){var n=e.view[i],o=t.options.lineWrapping,s=void 0,a=0;if(!n.hidden){if(T&&k<8){var l=n.node.offsetTop+n.node.offsetHeight;s=l-r,r=l}else{var h=n.node.getBoundingClientRect();s=h.bottom-h.top,!o&&n.text.firstChild&&(a=n.text.firstChild.getBoundingClientRect().right-h.left-1)}var c=n.line.height-s;if((.005<c||c<-.005)&&(ie(n.line,s),Oi(n.line),n.rest))for(var u=0;u<n.rest.length;u++)Oi(n.rest[u]);if(a>t.display.sizerWidth){var f=Math.ceil(a/li(t.display));f>t.display.maxLineLength&&(t.display.maxLineLength=f,t.display.maxLine=n.line,t.display.maxLineChanged=!0)}}}}function Oi(t){if(t.widgets)for(var e=0;e<t.widgets.length;++e){var r=t.widgets[e],i=r.node.parentNode;i&&(r.height=i.offsetHeight)}}function Ii(t,e,r){var i=r&&null!=r.top?Math.max(0,r.top):t.scroller.scrollTop;i=Math.floor(i-Lr(t));var n=r&&null!=r.bottom?r.bottom:i+t.wrapper.clientHeight,o=oe(e,i),s=oe(e,n);if(r&&r.ensure){var a=r.ensure.from.line,l=r.ensure.to.line;a<o?s=oe(e,Xe(te(e,o=a))+t.wrapper.clientHeight):Math.min(l,e.lastLine())>=s&&(o=oe(e,Xe(te(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function Ri(t,e){var r=t.display,i=ai(t.display);e.top<0&&(e.top=0);var n=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:r.scroller.scrollTop,o=Mr(t),s={};e.bottom-e.top>o&&(e.bottom=e.top+o);var a=t.doc.height+Nr(r),l=e.top<i,h=e.bottom>a-i;if(e.top<n)s.scrollTop=l?0:e.top;else if(e.bottom>n+o){var c=Math.min(e.top,(h?a:e.bottom)-o);c!=n&&(s.scrollTop=c)}var u=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:r.scroller.scrollLeft,f=Rr(t)-(t.options.fixedGutter?r.gutters.offsetWidth:0),p=e.right-e.left>f;return p&&(e.right=e.left+f),e.left<10?s.scrollLeft=0:e.left<u?s.scrollLeft=Math.max(0,e.left-(p?0:10)):e.right>f+u-3&&(s.scrollLeft=e.right+(p?0:10)-f),s}function Mi(t,e){null!=e&&(Bi(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Di(t){Bi(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Pi(t,e,r){null==e&&null==r||Bi(t),null!=e&&(t.curOp.scrollLeft=e),null!=r&&(t.curOp.scrollTop=r)}function Bi(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,Ui(t,ti(t,e.from),ti(t,e.to),e.margin))}function Ui(t,e,r,i){var n=Ri(t,{left:Math.min(e.left,r.left),top:Math.min(e.top,r.top)-i,right:Math.max(e.right,r.right),bottom:Math.max(e.bottom,r.bottom)+i});Pi(t,n.scrollLeft,n.scrollTop)}function Fi(t,e){Math.abs(t.doc.scrollTop-e)<2||(m||fn(t,{top:e}),Hi(t,e,!0),m&&fn(t),an(t,100))}function Hi(t,e,r){e=Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e),t.display.scroller.scrollTop==e&&!r||(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function zi(t,e,r,i){e=Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth),(r?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!i||(t.doc.scrollLeft=e,mn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Wi(t){var e=t.display,r=e.gutters.offsetWidth,i=Math.round(t.doc.height+Nr(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?r:0,docHeight:i,scrollHeight:i+Ir(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:r}}function qi(t,e,r){this.cm=r;var i=this.vert=N("div",[N("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),n=this.horiz=N("div",[N("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=n.tabIndex=-1,t(i),t(n),xt(i,"scroll",function(){i.clientHeight&&e(i.scrollTop,"vertical")}),xt(n,"scroll",function(){n.clientWidth&&e(n.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,T&&k<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}qi.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,r=t.scrollHeight>t.clientHeight+1,i=t.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=e?i+"px":"0";var n=t.viewHeight-(e?i:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+n)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=r?i+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(r?i:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&0<t.clientHeight&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?i:0,bottom:e?i:0}},qi.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},qi.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},qi.prototype.zeroWidthHack=function(){var t=x&&!a?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new F,this.disableVert=new F},qi.prototype.enableZeroWidthBar=function(r,i,n){r.style.pointerEvents="auto",i.set(1e3,function t(){var e=r.getBoundingClientRect();("vert"==n?document.elementFromPoint(e.right-1,(e.top+e.bottom)/2):document.elementFromPoint((e.right+e.left)/2,e.bottom-1))!=r?r.style.pointerEvents="none":i.set(1e3,t)})},qi.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};function Gi(){}function ji(t,e){e=e||Wi(t);var r=t.display.barWidth,i=t.display.barHeight;Vi(t,e);for(var n=0;n<4&&r!=t.display.barWidth||i!=t.display.barHeight;n++)r!=t.display.barWidth&&t.options.lineWrapping&&Ni(t),Vi(t,Wi(t)),r=t.display.barWidth,i=t.display.barHeight}function Vi(t,e){var r=t.display,i=r.scrollbars.update(e);r.sizer.style.paddingRight=(r.barWidth=i.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=i.bottom)+"px",r.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=i.bottom+"px",r.scrollbarFiller.style.width=i.right+"px"):r.scrollbarFiller.style.display="",i.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=i.bottom+"px",r.gutterFiller.style.width=e.gutterWidth+"px"):r.gutterFiller.style.display=""}Gi.prototype.update=function(){return{bottom:0,right:0}},Gi.prototype.setScrollLeft=function(){},Gi.prototype.setScrollTop=function(){},Gi.prototype.clear=function(){};var Yi={native:qi,null:Gi};function Ki(r){r.display.scrollbars&&(r.display.scrollbars.clear(),r.display.scrollbars.addClass&&C(r.display.wrapper,r.display.scrollbars.addClass)),r.display.scrollbars=new Yi[r.options.scrollbarStyle](function(t){r.display.wrapper.insertBefore(t,r.display.scrollbarFiller),xt(t,"mousedown",function(){r.state.focused&&setTimeout(function(){return r.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,e){("horizontal"==e?zi:Fi)(r,t)},r),r.display.scrollbars.addClass&&R(r.display.wrapper,r.display.scrollbars.addClass)}var $i=0;function Qi(t){var e;t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++$i},e=t.curOp,fr?fr.ops.push(e):e.ownsGroup=fr={ops:[e],delayedCallbacks:[]}}function Xi(t){var e=t.curOp;e&&pr(e,function(t){for(var e=0;e<t.ops.length;e++)t.ops[e].cm.curOp=null;!function(t){for(var e=t.ops,r=0;r<e.length;r++)Zi(e[r]);for(var i=0;i<e.length;i++)(n=e[i]).updatedDisplay=n.mustUpdate&&cn(n.cm,n.update);var n;for(var o=0;o<e.length;o++)Ji(e[o]);for(var s=0;s<e.length;s++)tn(e[s]);for(var a=0;a<e.length;a++)en(e[a])}(t)})}function Zi(t){var e,r,i=t.cm,n=i.display;!(r=(e=i).display).scrollbarsClipped&&r.scroller.offsetWidth&&(r.nativeBarWidth=r.scroller.offsetWidth-r.scroller.clientWidth,r.heightForcer.style.height=Ir(e)+"px",r.sizer.style.marginBottom=-r.nativeBarWidth+"px",r.sizer.style.borderRightWidth=Ir(e)+"px",r.scrollbarsClipped=!0),t.updateMaxLine&&Je(i),t.mustUpdate=t.viewChanged||t.forceUpdate||null!=t.scrollTop||t.scrollToPos&&(t.scrollToPos.from.line<n.viewFrom||t.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&i.options.lineWrapping,t.update=t.mustUpdate&&new hn(i,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Ji(t){var e=t.cm,r=e.display;t.updatedDisplay&&Ni(e),t.barMeasure=Wi(e),r.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Pr(e,r.maxLine,r.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+t.adjustWidthTo+Ir(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+t.adjustWidthTo-Rr(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=r.input.prepareSelection())}function tn(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft<e.doc.scrollLeft&&zi(e,Math.min(e.display.scroller.scrollLeft,t.maxScrollLeft),!0),e.display.maxLineChanged=!1);var r=t.focus&&t.focus==I();t.preparedSelection&&e.display.input.showSelection(t.preparedSelection,r),!t.updatedDisplay&&t.startHeight==e.doc.height||ji(e,t.barMeasure),t.updatedDisplay&&dn(e,t.barMeasure),t.selectionChanged&&Ei(e),e.state.focused&&t.updateInput&&e.display.input.reset(t.typing),r&&Ci(t.cm)}function en(t){var e=t.cm,r=e.display,i=e.doc;t.updatedDisplay&&un(e,t.update),null==r.wheelStartX||null==t.scrollTop&&null==t.scrollLeft&&!t.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=t.scrollTop&&Hi(e,t.scrollTop,t.forceScroll),null!=t.scrollLeft&&zi(e,t.scrollLeft,!0,!0),t.scrollToPos&&function(t,e){if(!wt(t,"scrollCursorIntoView")){var r=t.display,i=r.sizer.getBoundingClientRect(),n=null;if(e.top+i.top<0?n=!0:e.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(n=!1),null!=n&&!h){var o=N("div","",null,"position: absolute;\n top: "+(e.top-r.viewOffset-Lr(t.display))+"px;\n height: "+(e.bottom-e.top+Ir(t)+r.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(n),t.display.lineSpace.removeChild(o)}}}(e,function(t,e,r,i){var n;null==i&&(i=0),t.options.lineWrapping||e!=r||(r="before"==(e=e.ch?le(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?le(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var s=!1,a=Jr(t,e),l=r&&r!=e?Jr(t,r):a,h=Ri(t,n={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-i,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+i}),c=t.doc.scrollTop,u=t.doc.scrollLeft;if(null!=h.scrollTop&&(Fi(t,h.scrollTop),1<Math.abs(t.doc.scrollTop-c)&&(s=!0)),null!=h.scrollLeft&&(zi(t,h.scrollLeft),1<Math.abs(t.doc.scrollLeft-u)&&(s=!0)),!s)break}return n}(e,me(i,t.scrollToPos.from),me(i,t.scrollToPos.to),t.scrollToPos.margin));var n=t.maybeHiddenMarkers,o=t.maybeUnhiddenMarkers;if(n)for(var s=0;s<n.length;++s)n[s].lines.length||bt(n[s],"hide");if(o)for(var a=0;a<o.length;++a)o[a].lines.length&&bt(o[a],"unhide");r.wrapper.offsetHeight&&(i.scrollTop=e.display.scroller.scrollTop),t.changeObjs&&bt(e,"changes",e,t.changeObjs),t.update&&t.update.finish()}function rn(t,e){if(t.curOp)return e();Qi(t);try{return e()}finally{Xi(t)}}function nn(t,e){return function(){if(t.curOp)return e.apply(t,arguments);Qi(t);try{return e.apply(t,arguments)}finally{Xi(t)}}}function on(t){return function(){if(this.curOp)return t.apply(this,arguments);Qi(this);try{return t.apply(this,arguments)}finally{Xi(this)}}}function sn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Qi(t);try{return e.apply(this,arguments)}finally{Xi(t)}}}function an(t,e){t.doc.highlightFrontier<t.display.viewTo&&t.state.highlight.set(e,P(ln,t))}function ln(l){var h=l.doc;if(!(h.highlightFrontier>=l.display.viewTo)){var c=+new Date+l.options.workTime,u=Te(l,h.highlightFrontier),f=[];h.iter(u.line,Math.min(h.first+h.size,l.display.viewTo+500),function(t){if(u.line>=l.display.viewFrom){var e=t.styles,r=t.text.length>l.options.maxHighlightLength?Qt(h.mode,u.state):null,i=ye(l,t,u,!0);r&&(u.state=r),t.styles=i.styles;var n=t.styleClasses,o=i.classes;o?t.styleClasses=o:n&&(t.styleClasses=null);for(var s=!e||e.length!=t.styles.length||n!=o&&(!n||!o||n.bgClass!=o.bgClass||n.textClass!=o.textClass),a=0;!s&&a<e.length;++a)s=e[a]!=t.styles[a];s&&f.push(u.line),t.stateAfter=u.save(),u.nextLine()}else t.text.length<=l.options.maxHighlightLength&&ke(l,t.text,u),t.stateAfter=u.line%5==0?u.save():null,u.nextLine();if(+new Date>c)return an(l,l.options.workDelay),!0}),h.highlightFrontier=u.line,h.modeFrontier=Math.max(h.modeFrontier,u.line),f.length&&rn(l,function(){for(var t=0;t<f.length;t++)gi(l,f[t],"text")})}}var hn=function(t,e,r){var i=t.display;this.viewport=e,this.visible=Ii(i,t.doc,e),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=Rr(t),this.force=r,this.dims=hi(t),this.events=[]};function cn(t,e){var r=t.display,i=t.doc;if(e.editorIsHidden)return _i(t),!1;if(!e.force&&e.visible.from>=r.viewFrom&&e.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==yi(t))return!1;gn(t)&&(_i(t),e.dims=hi(t));var n=i.first+i.size,o=Math.max(e.visible.from-t.options.viewportMargin,i.first),s=Math.min(n,e.visible.to+t.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(i.first,r.viewFrom)),r.viewTo>s&&r.viewTo-s<20&&(s=Math.min(n,r.viewTo)),Ne&&(o=Ye(t.doc,o),s=Ke(t.doc,s));var a,l,h,c,u=o!=r.viewFrom||s!=r.viewTo||r.lastWrapHeight!=e.wrapperHeight||r.lastWrapWidth!=e.wrapperWidth;l=o,h=s,0==(c=(a=t).display).view.length||l>=c.viewTo||h<=c.viewFrom?(c.view=ur(a,l,h),c.viewFrom=l):(c.viewFrom>l?c.view=ur(a,l,c.viewFrom).concat(c.view):c.viewFrom<l&&(c.view=c.view.slice(di(a,l))),c.viewFrom=l,c.viewTo<h?c.view=c.view.concat(ur(a,c.viewTo,h)):c.viewTo>h&&(c.view=c.view.slice(0,di(a,h)))),c.viewTo=h,r.viewOffset=Xe(te(t.doc,r.viewFrom)),t.display.mover.style.top=r.viewOffset+"px";var f=yi(t);if(!u&&0==f&&!e.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var p=function(t){if(t.hasFocus())return null;var e=I();if(!e||!O(t.display.lineDiv,e))return null;var r={activeElt:e};if(window.getSelection){var i=window.getSelection();i.anchorNode&&i.extend&&O(t.display.lineDiv,i.anchorNode)&&(r.anchorNode=i.anchorNode,r.anchorOffset=i.anchorOffset,r.focusNode=i.focusNode,r.focusOffset=i.focusOffset)}return r}(t);return 4<f&&(r.lineDiv.style.display="none"),function(r,t,e){var i=r.display,n=r.options.lineNumbers,o=i.lineDiv,s=o.firstChild;function a(t){var e=t.nextSibling;return y&&x&&r.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),e}for(var l=i.view,h=i.viewFrom,c=0;c<l.length;c++){var u=l[c];if(!u.hidden)if(u.node&&u.node.parentNode==o){for(;s!=u.node;)s=a(s);var f=n&&null!=t&&t<=h&&u.lineNumber;u.changes&&(-1<H(u.changes,"gutter")&&(f=!1),_r(r,u,h,e)),f&&(S(u.lineNumber),u.lineNumber.appendChild(document.createTextNode(ae(r.options,h)))),s=u.node.nextSibling}else{var p=(g=h,_=e,v=yr(d=r,m=u),m.text=m.node=v.pre,v.bgClass&&(m.bgClass=v.bgClass),v.textClass&&(m.textClass=v.textClass),Tr(d,m),kr(d,m,g,_),wr(d,m,_),m.node);o.insertBefore(p,s)}h+=u.size}var d,m,g,_,v;for(;s;)s=a(s)}(t,r.updateLineNumbers,e.dims),4<f&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(t){if(t&&t.activeElt&&t.activeElt!=I()&&(t.activeElt.focus(),t.anchorNode&&O(document.body,t.anchorNode)&&O(document.body,t.focusNode))){var e=window.getSelection(),r=document.createRange();r.setEnd(t.anchorNode,t.anchorOffset),r.collapse(!1),e.removeAllRanges(),e.addRange(r),e.extend(t.focusNode,t.focusOffset)}}(p),S(r.cursorDiv),S(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,u&&(r.lastWrapHeight=e.wrapperHeight,r.lastWrapWidth=e.wrapperWidth,an(t,400)),!(r.updateLineNumbers=null)}function un(t,e){for(var r=e.viewport,i=!0;(i&&t.options.lineWrapping&&e.oldDisplayWidth!=Rr(t)||(r&&null!=r.top&&(r={top:Math.min(t.doc.height+Nr(t.display)-Mr(t),r.top)}),e.visible=Ii(t.display,t.doc,r),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&cn(t,e);i=!1){Ni(t);var n=Wi(t);xi(t),ji(t,n),dn(t,n),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function fn(t,e){var r=new hn(t,e);if(cn(t,r)){Ni(t),un(t,r);var i=Wi(t);xi(t),ji(t,i),dn(t,i),r.finish()}}function pn(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function dn(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Ir(t)+"px"}function mn(t){var e=t.display,r=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=ci(e)-e.scroller.scrollLeft+t.doc.scrollLeft,n=e.gutters.offsetWidth,o=i+"px",s=0;s<r.length;s++)if(!r[s].hidden){t.options.fixedGutter&&(r[s].gutter&&(r[s].gutter.style.left=o),r[s].gutterBackground&&(r[s].gutterBackground.style.left=o));var a=r[s].alignable;if(a)for(var l=0;l<a.length;l++)a[l].style.left=o}t.options.fixedGutter&&(e.gutters.style.left=i+n+"px")}}function gn(t){if(t.options.lineNumbers){var e=t.doc,r=ae(t.options,e.first+e.size-1),i=t.display;if(r.length!=i.lineNumChars){var n=i.measure.appendChild(N("div",[N("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=n.firstChild.offsetWidth,s=n.offsetWidth-o;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(o,i.lineGutter.offsetWidth-s)+1,i.lineNumWidth=i.lineNumInnerWidth+s,i.lineNumChars=i.lineNumInnerWidth?r.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",pn(t.display),1}}}function _n(t,e){for(var r=[],i=!1,n=0;n<t.length;n++){var o=t[n],s=null;if("string"!=typeof o&&(s=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!e)continue;i=!0}r.push({className:o,style:s})}return e&&!i&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function vn(t){var e=t.gutters,r=t.gutterSpecs;S(e),t.lineGutter=null;for(var i=0;i<r.length;++i){var n=r[i],o=n.className,s=n.style,a=e.appendChild(N("div",null,"CodeMirror-gutter "+o));s&&(a.style.cssText=s),"CodeMirror-linenumbers"==o&&((t.lineGutter=a).style.width=(t.lineNumWidth||1)+"px")}e.style.display=r.length?"":"none",pn(t)}function yn(t){vn(t.display),mi(t),mn(t)}function xn(t,e,r,i){var n=this;this.input=r,n.scrollbarFiller=N("div",null,"CodeMirror-scrollbar-filler"),n.scrollbarFiller.setAttribute("cm-not-content","true"),n.gutterFiller=N("div",null,"CodeMirror-gutter-filler"),n.gutterFiller.setAttribute("cm-not-content","true"),n.lineDiv=L("div",null,"CodeMirror-code"),n.selectionDiv=N("div",null,null,"position: relative; z-index: 1"),n.cursorDiv=N("div",null,"CodeMirror-cursors"),n.measure=N("div",null,"CodeMirror-measure"),n.lineMeasure=N("div",null,"CodeMirror-measure"),n.lineSpace=L("div",[n.measure,n.lineMeasure,n.selectionDiv,n.cursorDiv,n.lineDiv],null,"position: relative; outline: none");var o=L("div",[n.lineSpace],"CodeMirror-lines");n.mover=N("div",[o],null,"position: relative"),n.sizer=N("div",[n.mover],"CodeMirror-sizer"),n.sizerWidth=null,n.heightForcer=N("div",null,null,"position: absolute; height: "+z+"px; width: 1px;"),n.gutters=N("div",null,"CodeMirror-gutters"),n.lineGutter=null,n.scroller=N("div",[n.sizer,n.heightForcer,n.gutters],"CodeMirror-scroll"),n.scroller.setAttribute("tabIndex","-1"),n.wrapper=N("div",[n.scrollbarFiller,n.gutterFiller,n.scroller],"CodeMirror"),T&&k<8&&(n.gutters.style.zIndex=-1,n.scroller.style.paddingRight=0),y||m&&f||(n.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(n.wrapper):t(n.wrapper)),n.viewFrom=n.viewTo=e.first,n.reportedViewFrom=n.reportedViewTo=e.first,n.view=[],n.renderedView=null,n.externalMeasured=null,n.viewOffset=0,n.lastWrapHeight=n.lastWrapWidth=0,n.updateLineNumbers=null,n.nativeBarWidth=n.barHeight=n.barWidth=0,n.scrollbarsClipped=!1,n.lineNumWidth=n.lineNumInnerWidth=n.lineNumChars=null,n.alignWidgets=!1,n.cachedCharWidth=n.cachedTextHeight=n.cachedPaddingH=null,n.maxLine=null,n.maxLineLength=0,n.maxLineChanged=!1,n.wheelDX=n.wheelDY=n.wheelStartX=n.wheelStartY=null,n.shift=!1,n.selForContextMenu=null,n.activeTouch=null,n.gutterSpecs=_n(i.gutters,i.lineNumbers),vn(n),r.init(n)}hn.prototype.signal=function(t,e){Ct(t,e)&&this.events.push(arguments)},hn.prototype.finish=function(){for(var t=0;t<this.events.length;t++)bt.apply(null,this.events[t])};var Tn=0,kn=null;function bn(t){var e=t.wheelDeltaX,r=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==r&&t.detail&&t.axis==t.VERTICAL_AXIS?r=t.detail:null==r&&(r=t.wheelDelta),{x:e,y:r}}function wn(t){var e=bn(t);return e.x*=kn,e.y*=kn,e}function En(t,e){var r=bn(e),i=r.x,n=r.y,o=t.display,s=o.scroller,a=s.scrollWidth>s.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&a||n&&l){if(n&&x&&y)t:for(var h=e.target,c=o.view;h!=s;h=h.parentNode)for(var u=0;u<c.length;u++)if(c[u].node==h){t.display.currentWheelTarget=h;break t}if(i&&!m&&!g&&null!=kn)return n&&l&&Fi(t,Math.max(0,s.scrollTop+n*kn)),zi(t,Math.max(0,s.scrollLeft+i*kn)),(!n||n&&l)&&At(e),void(o.wheelStartX=null);if(n&&null!=kn){var f=n*kn,p=t.doc.scrollTop,d=p+o.wrapper.clientHeight;f<0?p=Math.max(0,p+f-50):d=Math.min(t.doc.height,d+f+50),fn(t,{top:p,bottom:d})}Tn<20&&(null==o.wheelStartX?(o.wheelStartX=s.scrollLeft,o.wheelStartY=s.scrollTop,o.wheelDX=i,o.wheelDY=n,setTimeout(function(){if(null!=o.wheelStartX){var t=s.scrollLeft-o.wheelStartX,e=s.scrollTop-o.wheelStartY,r=e&&o.wheelDY&&e/o.wheelDY||t&&o.wheelDX&&t/o.wheelDX;o.wheelStartX=o.wheelStartY=null,r&&(kn=(kn*Tn+r)/(Tn+1),++Tn)}},200)):(o.wheelDX+=i,o.wheelDY+=n))}}T?kn=-.53:m?kn=15:s?kn=-.7:l&&(kn=-1/3);var Cn=function(t,e){this.ranges=t,this.primIndex=e};Cn.prototype.primary=function(){return this.ranges[this.primIndex]},Cn.prototype.equals=function(t){if(t==this)return!0;if(t.primIndex!=this.primIndex||t.ranges.length!=this.ranges.length)return!1;for(var e=0;e<this.ranges.length;e++){var r=this.ranges[e],i=t.ranges[e];if(!ce(r.anchor,i.anchor)||!ce(r.head,i.head))return!1}return!0},Cn.prototype.deepCopy=function(){for(var t=[],e=0;e<this.ranges.length;e++)t[e]=new Sn(ue(this.ranges[e].anchor),ue(this.ranges[e].head));return new Cn(t,this.primIndex)},Cn.prototype.somethingSelected=function(){for(var t=0;t<this.ranges.length;t++)if(!this.ranges[t].empty())return!0;return!1},Cn.prototype.contains=function(t,e){e=e||t;for(var r=0;r<this.ranges.length;r++){var i=this.ranges[r];if(0<=he(e,i.from())&&he(t,i.to())<=0)return r}return-1};var Sn=function(t,e){this.anchor=t,this.head=e};function An(t,e,r){var i=t&&t.options.selectionsMayTouch,n=e[r];e.sort(function(t,e){return he(t.from(),e.from())}),r=H(e,n);for(var o=1;o<e.length;o++){var s=e[o],a=e[o-1],l=he(a.to(),s.from());if(i&&!s.empty()?0<l:0<=l){var h=pe(a.from(),s.from()),c=fe(a.to(),s.to()),u=a.empty()?s.from()==s.head:a.from()==a.head;o<=r&&--r,e.splice(--o,2,new Sn(u?c:h,u?h:c))}}return new Cn(e,r)}function Ln(t,e){return new Cn([new Sn(t,e||t)],0)}function Nn(t){return t.text?le(t.from.line+t.text.length-1,$(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function On(t,e){if(he(t,e.from)<0)return t;if(he(t,e.to)<=0)return Nn(e);var r=t.line+e.text.length-(e.to.line-e.from.line)-1,i=t.ch;return t.line==e.to.line&&(i+=Nn(e).ch-e.to.ch),le(r,i)}function In(t,e){for(var r=[],i=0;i<t.sel.ranges.length;i++){var n=t.sel.ranges[i];r.push(new Sn(On(n.anchor,e),On(n.head,e)))}return An(t.cm,r,t.sel.primIndex)}function Rn(t,e,r){return t.line==e.line?le(r.line,t.ch-e.ch+r.ch):le(r.line+(t.line-e.line),t.ch)}function Mn(t){t.doc.mode=Yt(t.options,t.doc.modeOption),Dn(t)}function Dn(t){t.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),t.doc.modeFrontier=t.doc.highlightFrontier=t.doc.first,an(t,100),t.state.modeGen++,t.curOp&&mi(t)}function Pn(t,e){return 0==e.from.ch&&0==e.to.ch&&""==$(e.text)&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function Bn(t,i,e,n){function o(t){return e?e[t]:null}function r(t,e,r){!function(t,e,r,i){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),Pe(t),Be(t,r);var n=i?i(t):1;n!=t.height&&ie(t,n)}(t,e,r,n),mr(t,"change",t,i)}function s(t,e){for(var r=[],i=t;i<e;++i)r.push(new tr(h[i],o(i),n));return r}var a=i.from,l=i.to,h=i.text,c=te(t,a.line),u=te(t,l.line),f=$(h),p=o(h.length-1),d=l.line-a.line;if(i.full)t.insert(0,s(0,h.length)),t.remove(h.length,t.size-h.length);else if(Pn(t,i)){var m=s(0,h.length-1);r(u,u.text,p),d&&t.remove(a.line,d),m.length&&t.insert(a.line,m)}else if(c==u)if(1==h.length)r(c,c.text.slice(0,a.ch)+f+c.text.slice(l.ch),p);else{var g=s(1,h.length-1);g.push(new tr(f+c.text.slice(l.ch),p,n)),r(c,c.text.slice(0,a.ch)+h[0],o(0)),t.insert(a.line+1,g)}else if(1==h.length)r(c,c.text.slice(0,a.ch)+h[0]+u.text.slice(l.ch),o(0)),t.remove(a.line+1,d);else{r(c,c.text.slice(0,a.ch)+h[0],o(0)),r(u,f+u.text.slice(l.ch),p);var _=s(1,h.length-1);1<d&&t.remove(a.line+1,d-1),t.insert(a.line+1,_)}mr(t,"change",t,i)}function Un(t,a,l){!function t(e,r,i){if(e.linked)for(var n=0;n<e.linked.length;++n){var o=e.linked[n];if(o.doc!=r){var s=i&&o.sharedHist;l&&!s||(a(o.doc,s),t(o.doc,e,s))}}}(t,null,!0)}function Fn(t,e){if(e.cm)throw new Error("This document is already in use.");fi((t.doc=e).cm=t),Mn(t),Hn(t),t.options.lineWrapping||Je(t),t.options.mode=e.modeOption,mi(t)}function Hn(t){("rtl"==t.doc.direction?R:C)(t.display.lineDiv,"CodeMirror-rtl")}function zn(t){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=t||1}function Wn(t,e){var r={from:ue(e.from),to:Nn(e),text:ee(t,e.from,e.to)};return Yn(t,r,e.from.line,e.to.line+1),Un(t,function(t){return Yn(t,r,e.from.line,e.to.line+1)},!0),r}function qn(t){for(;t.length;){if(!$(t).ranges)break;t.pop()}}function Gn(t,e,r,i){var n=t.history;n.undone.length=0;var o,s,a,l=+new Date;if((n.lastOp==i||n.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&n.lastModTime>l-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=(a=n).lastOp==i?(qn(a.done),$(a.done)):a.done.length&&!$(a.done).ranges?$(a.done):1<a.done.length&&!a.done[a.done.length-2].ranges?(a.done.pop(),$(a.done)):void 0))s=$(o.changes),0==he(e.from,e.to)&&0==he(e.from,s.to)?s.to=Nn(e):o.changes.push(Wn(t,e));else{var h=$(n.done);for(h&&h.ranges||Vn(t.sel,n.done),o={changes:[Wn(t,e)],generation:n.generation},n.done.push(o);n.done.length>n.undoDepth;)n.done.shift(),n.done[0].ranges||n.done.shift()}n.done.push(r),n.generation=++n.maxGeneration,n.lastModTime=n.lastSelTime=l,n.lastOp=n.lastSelOp=i,n.lastOrigin=n.lastSelOrigin=e.origin,s||bt(t,"historyAdded")}function jn(t,e,r,i){var n,o,s,a,l,h=t.history,c=i&&i.origin;r==h.lastSelOp||c&&h.lastSelOrigin==c&&(h.lastModTime==h.lastSelTime&&h.lastOrigin==c||(n=t,o=c,s=$(h.done),a=e,"*"==(l=o.charAt(0))||"+"==l&&s.ranges.length==a.ranges.length&&s.somethingSelected()==a.somethingSelected()&&new Date-n.history.lastSelTime<=(n.cm?n.cm.options.historyEventDelay:500)))?h.done[h.done.length-1]=e:Vn(e,h.done),h.lastSelTime=+new Date,h.lastSelOrigin=c,h.lastSelOp=r,i&&!1!==i.clearRedo&&qn(h.undone)}function Vn(t,e){var r=$(e);r&&r.ranges&&r.equals(t)||e.push(t)}function Yn(e,r,t,i){var n=r["spans_"+e.id],o=0;e.iter(Math.max(e.first,t),Math.min(e.first+e.size,i),function(t){t.markedSpans&&((n=n||(r["spans_"+e.id]={}))[o]=t.markedSpans),++o})}function Kn(t){if(!t)return null;for(var e,r=0;r<t.length;++r)t[r].marker.explicitlyCleared?e=e||t.slice(0,r):e&&e.push(t[r]);return e?e.length?e:null:t}function $n(t,e){var r=function(t,e){var r=e["spans_"+t.id];if(!r)return null;for(var i=[],n=0;n<e.text.length;++n)i.push(Kn(r[n]));return i}(t,e),i=Me(t,e);if(!r)return i;if(!i)return r;for(var n=0;n<r.length;++n){var o=r[n],s=i[n];if(o&&s)t:for(var a=0;a<s.length;++a){for(var l=s[a],h=0;h<o.length;++h)if(o[h].marker==l.marker)continue t;o.push(l)}else s&&(r[n]=s)}return r}function Qn(t,e,r){for(var i=[],n=0;n<t.length;++n){var o=t[n];if(o.ranges)i.push(r?Cn.prototype.deepCopy.call(o):o);else{var s=o.changes,a=[];i.push({changes:a});for(var l=0;l<s.length;++l){var h=s[l],c=void 0;if(a.push({from:h.from,to:h.to,text:h.text}),e)for(var u in h)(c=u.match(/^spans_(\d+)$/))&&-1<H(e,Number(c[1]))&&($(a)[u]=h[u],delete h[u])}}}return i}function Xn(t,e,r,i){if(i){var n=t.anchor;if(r){var o=he(e,n)<0;o!=he(r,n)<0?(n=e,e=r):o!=he(e,r)<0&&(e=r)}return new Sn(n,e)}return new Sn(r||e,e)}function Zn(t,e,r,i,n){null==n&&(n=t.cm&&(t.cm.display.shift||t.extend)),io(t,new Cn([Xn(t.sel.primary(),e,r,n)],0),i)}function Jn(t,e,r){for(var i=[],n=t.cm&&(t.cm.display.shift||t.extend),o=0;o<t.sel.ranges.length;o++)i[o]=Xn(t.sel.ranges[o],e[o],null,n);io(t,An(t.cm,i,t.sel.primIndex),r)}function to(t,e,r,i){var n=t.sel.ranges.slice(0);n[e]=r,io(t,An(t.cm,n,t.sel.primIndex),i)}function eo(t,e,r,i){io(t,Ln(e,r),i)}function ro(t,e,r){var i=t.history.done,n=$(i);n&&n.ranges?no(t,i[i.length-1]=e,r):io(t,e,r)}function io(t,e,r){no(t,e,r),jn(t,t.sel,t.cm?t.cm.curOp.id:NaN,r)}function no(t,e,r){var i,n,o,s;(Ct(t,"beforeSelectionChange")||t.cm&&Ct(t.cm,"beforeSelectionChange"))&&(i=t,o=r,s={ranges:(n=e).ranges,update:function(t){this.ranges=[];for(var e=0;e<t.length;e++)this.ranges[e]=new Sn(me(i,t[e].anchor),me(i,t[e].head))},origin:o&&o.origin},bt(i,"beforeSelectionChange",i,s),i.cm&&bt(i.cm,"beforeSelectionChange",i.cm,s),e=s.ranges!=n.ranges?An(i.cm,s.ranges,s.ranges.length-1):n);var a=r&&r.bias||(he(e.primary().head,t.sel.primary().head)<0?-1:1);oo(t,ao(t,e,a,!0)),r&&!1===r.scroll||!t.cm||Di(t.cm)}function oo(t,e){e.equals(t.sel)||(t.sel=e,t.cm&&(t.cm.curOp.updateInput=1,t.cm.curOp.selectionChanged=!0,Et(t.cm)),mr(t,"cursorActivity",t))}function so(t){oo(t,ao(t,t.sel,null,!1))}function ao(t,e,r,i){for(var n,o=0;o<e.ranges.length;o++){var s=e.ranges[o],a=e.ranges.length==t.sel.ranges.length&&t.sel.ranges[o],l=ho(t,s.anchor,a&&a.anchor,r,i),h=ho(t,s.head,a&&a.head,r,i);!n&&l==s.anchor&&h==s.head||((n=n||e.ranges.slice(0,o))[o]=new Sn(l,h))}return n?An(t.cm,n,e.primIndex):e}function lo(t,e,r,i,n){var o=te(t,e.line);if(o.markedSpans)for(var s=0;s<o.markedSpans.length;++s){var a=o.markedSpans[s],l=a.marker,h="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,c="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==a.from||(h?a.from<=e.ch:a.from<e.ch))&&(null==a.to||(c?a.to>=e.ch:a.to>e.ch))){if(n&&(bt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(r){var u=l.find(i<0?1:-1),f=void 0;if((i<0?c:h)&&(u=co(t,u,-i,u&&u.line==e.line?o:null)),u&&u.line==e.line&&(f=he(u,r))&&(i<0?f<0:0<f))return lo(t,u,e,i,n)}var p=l.find(i<0?-1:1);return(i<0?h:c)&&(p=co(t,p,i,p.line==e.line?o:null)),p?lo(t,p,e,i,n):null}}return e}function ho(t,e,r,i,n){var o=i||1,s=lo(t,e,r,o,n)||!n&&lo(t,e,r,o,!0)||lo(t,e,r,-o,n)||!n&&lo(t,e,r,-o,!0);return s||(t.cantEdit=!0,le(t.first,0))}function co(t,e,r,i){return r<0&&0==e.ch?e.line>t.first?me(t,le(e.line-1)):null:0<r&&e.ch==(i||te(t,e.line)).text.length?e.line<t.first+t.size-1?le(e.line+1,0):null:new le(e.line,e.ch+r)}function uo(t){t.setSelection(le(t.firstLine(),0),le(t.lastLine()),q)}function fo(n,t,e){var o={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return o.canceled=!0}};return e&&(o.update=function(t,e,r,i){t&&(o.from=me(n,t)),e&&(o.to=me(n,e)),r&&(o.text=r),void 0!==i&&(o.origin=i)}),bt(n,"beforeChange",n,o),n.cm&&bt(n.cm,"beforeChange",n.cm,o),o.canceled?(n.cm&&(n.cm.curOp.updateInput=2),null):{from:o.from,to:o.to,text:o.text,origin:o.origin}}function po(t,e,r){if(t.cm){if(!t.cm.curOp)return nn(t.cm,po)(t,e,r);if(t.cm.state.suppressEdits)return}if(!(Ct(t,"beforeChange")||t.cm&&Ct(t.cm,"beforeChange"))||(e=fo(t,e,!0))){var i=Le&&!r&&function(t,e,r){var i=null;if(t.iter(e.line,r.line+1,function(t){if(t.markedSpans)for(var e=0;e<t.markedSpans.length;++e){var r=t.markedSpans[e].marker;!r.readOnly||i&&-1!=H(i,r)||(i=i||[]).push(r)}}),!i)return null;for(var n=[{from:e,to:r}],o=0;o<i.length;++o)for(var s=i[o],a=s.find(0),l=0;l<n.length;++l){var h=n[l];if(!(he(h.to,a.from)<0||0<he(h.from,a.to))){var c=[l,1],u=he(h.from,a.from),f=he(h.to,a.to);(u<0||!s.inclusiveLeft&&!u)&&c.push({from:h.from,to:a.from}),(0<f||!s.inclusiveRight&&!f)&&c.push({from:a.to,to:h.to}),n.splice.apply(n,c),l+=c.length-3}}return n}(t,e.from,e.to);if(i)for(var n=i.length-1;0<=n;--n)mo(t,{from:i[n].from,to:i[n].to,text:n?[""]:e.text,origin:e.origin});else mo(t,e)}}function mo(t,r){if(1!=r.text.length||""!=r.text[0]||0!=he(r.from,r.to)){var e=In(t,r);Gn(t,r,e,t.cm?t.cm.curOp.id:NaN),vo(t,r,e,Me(t,r));var i=[];Un(t,function(t,e){e||-1!=H(i,t.history)||(ko(t.history,r),i.push(t.history)),vo(t,r,null,Me(t,r))})}}function go(n,o,t){var e=n.cm&&n.cm.state.suppressEdits;if(!e||t){for(var s,r=n.history,i=n.sel,a="undo"==o?r.done:r.undone,l="undo"==o?r.undone:r.done,h=0;h<a.length&&(s=a[h],t?!s.ranges||s.equals(n.sel):s.ranges);h++);if(h!=a.length){for(r.lastOrigin=r.lastSelOrigin=null;;){if(!(s=a.pop()).ranges){if(e)return void a.push(s);break}if(Vn(s,l),t&&!s.equals(n.sel))return void io(n,s,{clearRedo:!1});i=s}var c=[];Vn(i,l),l.push({changes:c,generation:r.generation}),r.generation=s.generation||++r.maxGeneration;for(var u=Ct(n,"beforeChange")||n.cm&&Ct(n.cm,"beforeChange"),f=function(t){var r=s.changes[t];if(r.origin=o,u&&!fo(n,r,!1))return a.length=0,{};c.push(Wn(n,r));var e=t?In(n,r):$(a);vo(n,r,e,$n(n,r)),!t&&n.cm&&n.cm.scrollIntoView({from:r.from,to:Nn(r)});var i=[];Un(n,function(t,e){e||-1!=H(i,t.history)||(ko(t.history,r),i.push(t.history)),vo(t,r,null,$n(t,r))})},p=s.changes.length-1;0<=p;--p){var d=f(p);if(d)return d.v}}}}function _o(t,e){if(0!=e&&(t.first+=e,t.sel=new Cn(Q(t.sel.ranges,function(t){return new Sn(le(t.anchor.line+e,t.anchor.ch),le(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){mi(t.cm,t.first,t.first-e,e);for(var r=t.cm.display,i=r.viewFrom;i<r.viewTo;i++)gi(t.cm,i,"gutter")}}function vo(t,e,r,i){if(t.cm&&!t.cm.curOp)return nn(t.cm,vo)(t,e,r,i);if(e.to.line<t.first)_o(t,e.text.length-1-(e.to.line-e.from.line));else if(!(e.from.line>t.lastLine())){if(e.from.line<t.first){var n=e.text.length-1-(t.first-e.from.line);_o(t,n),e={from:le(t.first,0),to:le(e.to.line+n,e.to.ch),text:[$(e.text)],origin:e.origin}}var o=t.lastLine();e.to.line>o&&(e={from:e.from,to:le(o,te(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=ee(t,e.from,e.to),r=r||In(t,e),t.cm?function(t,e,r){var i=t.doc,n=t.display,o=e.from,s=e.to,a=!1,l=o.line;t.options.lineWrapping||(l=ne(Ve(te(i,o.line))),i.iter(l,s.line+1,function(t){if(t==n.maxLine)return a=!0}));-1<i.sel.contains(e.from,e.to)&&Et(t);Bn(i,e,r,ui(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,function(t){var e=Ze(t);e>n.maxLineLength&&(n.maxLine=t,n.maxLineLength=e,n.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0));(function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontier<e-10)){for(var r=t.first,i=e-1;r<i;i--){var n=te(t,i).stateAfter;if(n&&(!(n instanceof _e)||i+n.lookAhead<e)){r=i+1;break}}t.highlightFrontier=Math.min(t.highlightFrontier,r)}})(i,o.line),an(t,400);var h=e.text.length-(s.line-o.line)-1;e.full?mi(t):o.line!=s.line||1!=e.text.length||Pn(t.doc,e)?mi(t,o.line,s.line+1,h):gi(t,o.line,"text");var c=Ct(t,"changes"),u=Ct(t,"change");if(u||c){var f={from:o,to:s,text:e.text,removed:e.removed,origin:e.origin};u&&mr(t,"change",t,f),c&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(f)}t.display.selForContextMenu=null}(t.cm,e,i):Bn(t,e,i),no(t,r,q),t.cantEdit&&ho(t,le(t.firstLine(),0))&&(t.cantEdit=!1)}}function yo(t,e,r,i,n){var o;he(i=i||r,r)<0&&(r=(o=[i,r])[0],i=o[1]),"string"==typeof e&&(e=t.splitLines(e)),po(t,{from:r,to:i,text:e,origin:n})}function xo(t,e,r,i){r<t.line?t.line+=i:e<t.line&&(t.line=e,t.ch=0)}function To(t,e,r,i){for(var n=0;n<t.length;++n){var o=t[n],s=!0;if(o.ranges){o.copied||((o=t[n]=o.deepCopy()).copied=!0);for(var a=0;a<o.ranges.length;a++)xo(o.ranges[a].anchor,e,r,i),xo(o.ranges[a].head,e,r,i)}else{for(var l=0;l<o.changes.length;++l){var h=o.changes[l];if(r<h.from.line)h.from=le(h.from.line+i,h.from.ch),h.to=le(h.to.line+i,h.to.ch);else if(e<=h.to.line){s=!1;break}}s||(t.splice(0,n+1),n=0)}}}function ko(t,e){var r=e.from.line,i=e.to.line,n=e.text.length-(i-r)-1;To(t.done,r,i,n),To(t.undone,r,i,n)}function bo(t,e,r,i){var n=e,o=e;return"number"==typeof e?o=te(t,de(t,e)):n=ne(e),null==n?null:(i(o,n)&&t.cm&&gi(t.cm,n,r),o)}function wo(t){this.lines=t,this.parent=null;for(var e=0,r=0;r<t.length;++r)t[r].parent=this,e+=t[r].height;this.height=e}function Eo(t){this.children=t;for(var e=0,r=0,i=0;i<t.length;++i){var n=t[i];e+=n.chunkSize(),r+=n.height,n.parent=this}this.size=e,this.height=r,this.parent=null}Sn.prototype.from=function(){return pe(this.anchor,this.head)},Sn.prototype.to=function(){return fe(this.anchor,this.head)},Sn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},wo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var r=t,i=t+e;r<i;++r){var n=this.lines[r];this.height-=n.height,(o=n).parent=null,Pe(o),mr(n,"delete")}var o;this.lines.splice(t,e)},collapse:function(t){t.push.apply(t,this.lines)},insertInner:function(t,e,r){this.height+=r,this.lines=this.lines.slice(0,t).concat(e).concat(this.lines.slice(t));for(var i=0;i<e.length;++i)e[i].parent=this},iterN:function(t,e,r){for(var i=t+e;t<i;++t)if(r(this.lines[t]))return!0}},Eo.prototype={chunkSize:function(){return this.size},removeInner:function(t,e){this.size-=e;for(var r=0;r<this.children.length;++r){var i=this.children[r],n=i.chunkSize();if(t<n){var o=Math.min(e,n-t),s=i.height;if(i.removeInner(t,o),this.height-=s-i.height,n==o&&(this.children.splice(r--,1),i.parent=null),0==(e-=o))break;t=0}else t-=n}if(this.size-e<25&&(1<this.children.length||!(this.children[0]instanceof wo))){var a=[];this.collapse(a),this.children=[new wo(a)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e<this.children.length;++e)this.children[e].collapse(t)},insertInner:function(t,e,r){this.size+=e.length,this.height+=r;for(var i=0;i<this.children.length;++i){var n=this.children[i],o=n.chunkSize();if(t<=o){if(n.insertInner(t,e,r),n.lines&&50<n.lines.length){for(var s=n.lines.length%25+25,a=s;a<n.lines.length;){var l=new wo(n.lines.slice(a,a+=25));n.height-=l.height,this.children.splice(++i,0,l),l.parent=this}n.lines=n.lines.slice(0,s),this.maybeSpill()}break}t-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var t=this;do{var e=new Eo(t.children.splice(t.children.length-5,5));if(t.parent){t.size-=e.size,t.height-=e.height;var r=H(t.parent.children,t);t.parent.children.splice(r+1,0,e)}else{var i=new Eo(t.children);(i.parent=t).children=[i,e],t=i}e.parent=t.parent}while(10<t.children.length);t.parent.maybeSpill()}},iterN:function(t,e,r){for(var i=0;i<this.children.length;++i){var n=this.children[i],o=n.chunkSize();if(t<o){var s=Math.min(e,o-t);if(n.iterN(t,s,r))return!0;if(0==(e-=s))break;t=0}else t-=o}}};function Co(t,e,r){if(r)for(var i in r)r.hasOwnProperty(i)&&(this[i]=r[i]);this.doc=t,this.node=e}function So(t,e,r){Xe(e)<(t.curOp&&t.curOp.scrollTop||t.doc.scrollTop)&&Mi(t,r)}Co.prototype.clear=function(){var t=this.doc.cm,e=this.line.widgets,r=this.line,i=ne(r);if(null!=i&&e){for(var n=0;n<e.length;++n)e[n]==this&&e.splice(n--,1);e.length||(r.widgets=null);var o=Sr(this);ie(r,Math.max(0,r.height-o)),t&&(rn(t,function(){So(t,r,-o),gi(t,i,"widget")}),mr(t,"lineWidgetCleared",t,this,i))}},Co.prototype.changed=function(){var t=this,e=this.height,r=this.doc.cm,i=this.line;this.height=null;var n=Sr(this)-e;n&&($e(this.doc,i)||ie(i,i.height+n),r&&rn(r,function(){r.curOp.forceUpdate=!0,So(r,i,n),mr(r,"lineWidgetChanged",r,t,ne(i))}))},St(Co);var Ao=0,Lo=function(t,e){this.lines=[],this.type=e,this.doc=t,this.id=++Ao};function No(e,i,n,t,r){if(t&&t.shared)return function(t,r,i,n,o){(n=B(n)).shared=!1;var s=[No(t,r,i,n,o)],a=s[0],l=n.widgetNode;return Un(t,function(t){l&&(n.widgetNode=l.cloneNode(!0)),s.push(No(t,me(t,r),me(t,i),n,o));for(var e=0;e<t.linked.length;++e)if(t.linked[e].isParent)return;a=$(s)}),new Oo(s,a)}(e,i,n,t,r);if(e.cm&&!e.cm.curOp)return nn(e.cm,No)(e,i,n,t,r);var o=new Lo(e,r),s=he(i,n);if(t&&B(t,o,!1),0<s||0==s&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=L("span",[o.replacedWith],"CodeMirror-widget"),t.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),t.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(je(e,i.line,i,n,o)||i.line!=n.line&&je(e,n.line,i,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ne=!0}o.addToHistory&&Gn(e,{from:i,to:n,origin:"markText"},e.sel,NaN);var a,l=i.line,h=e.cm;if(e.iter(l,n.line+1,function(t){var e,r;h&&o.collapsed&&!h.options.lineWrapping&&Ve(t)==h.display.maxLine&&(a=!0),o.collapsed&&l!=i.line&&ie(t,0),e=t,r=new Oe(o,l==i.line?i.ch:null,l==n.line?n.ch:null),e.markedSpans=e.markedSpans?e.markedSpans.concat([r]):[r],r.marker.attachLine(e),++l}),o.collapsed&&e.iter(i.line,n.line+1,function(t){$e(e,t)&&ie(t,0)}),o.clearOnEnter&&xt(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Le=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Ao,o.atomic=!0),h){if(a&&(h.curOp.updateMaxLine=!0),o.collapsed)mi(h,i.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=i.line;c<=n.line;c++)gi(h,c,"text");o.atomic&&so(h.doc),mr(h,"markerAdded",h,o)}return o}Lo.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Qi(t),Ct(this,"clear")){var r=this.find();r&&mr(this,"clear",r.from,r.to)}for(var i=null,n=null,o=0;o<this.lines.length;++o){var s=this.lines[o],a=Ie(s.markedSpans,this);t&&!this.collapsed?gi(t,ne(s),"text"):t&&(null!=a.to&&(n=ne(s)),null!=a.from&&(i=ne(s))),s.markedSpans=Re(s.markedSpans,a),null==a.from&&this.collapsed&&!$e(this.doc,s)&&t&&ie(s,ai(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var h=Ve(this.lines[l]),c=Ze(h);c>t.display.maxLineLength&&(t.display.maxLine=h,t.display.maxLineLength=c,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&mi(t,i,n+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&so(t.doc)),t&&mr(t,"markerCleared",t,this,i,n),e&&Xi(t),this.parent&&this.parent.clear()}},Lo.prototype.find=function(t,e){var r,i;null==t&&"bookmark"==this.type&&(t=1);for(var n=0;n<this.lines.length;++n){var o=this.lines[n],s=Ie(o.markedSpans,this);if(null!=s.from&&(r=le(e?o:ne(o),s.from),-1==t))return r;if(null!=s.to&&(i=le(e?o:ne(o),s.to),1==t))return i}return r&&{from:r,to:i}},Lo.prototype.changed=function(){var o=this,s=this.find(-1,!0),a=this,l=this.doc.cm;s&&l&&rn(l,function(){var t=s.line,e=ne(s.line),r=Br(l,e);if(r&&(Gr(r),l.curOp.selectionChanged=l.curOp.forceUpdate=!0),l.curOp.updateMaxLine=!0,!$e(a.doc,t)&&null!=a.height){var i=a.height;a.height=null;var n=Sr(a)-i;n&&ie(t,t.height+n)}mr(l,"markerChanged",l,o)})},Lo.prototype.attachLine=function(t){if(!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;e.maybeHiddenMarkers&&-1!=H(e.maybeHiddenMarkers,this)||(e.maybeUnhiddenMarkers||(e.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(t)},Lo.prototype.detachLine=function(t){if(this.lines.splice(H(this.lines,t),1),!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;(e.maybeHiddenMarkers||(e.maybeHiddenMarkers=[])).push(this)}},St(Lo);var Oo=function(t,e){this.markers=t,this.primary=e;for(var r=0;r<t.length;++r)t[r].parent=this};function Io(t){return t.findMarks(le(t.first,0),t.clipPos(le(t.lastLine())),function(t){return t.parent})}function Ro(o){for(var t=function(t){var e=o[t],r=[e.primary.doc];Un(e.primary.doc,function(t){return r.push(t)});for(var i=0;i<e.markers.length;i++){var n=e.markers[i];-1==H(r,n.doc)&&(n.parent=null,e.markers.splice(i--,1))}},e=0;e<o.length;e++)t(e)}Oo.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)this.markers[t].clear();mr(this,"clear")}},Oo.prototype.find=function(t,e){return this.primary.find(t,e)},St(Oo);var Mo=0,Do=function(t,e,r,i,n){if(!(this instanceof Do))return new Do(t,e,r,i,n);null==r&&(r=0),Eo.call(this,[new wo([new tr("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=le(r,0);this.sel=Ln(o),this.history=new zn(null),this.id=++Mo,this.modeOption=e,this.lineSep=i,this.direction="rtl"==n?"rtl":"ltr",this.extend=!1,"string"==typeof t&&(t=this.splitLines(t)),Bn(this,{from:o,to:o,text:t}),io(this,Ln(o),q)};Do.prototype=Z(Eo.prototype,{constructor:Do,iter:function(t,e,r){r?this.iterN(t-this.first,e-t,r):this.iterN(this.first,this.first+this.size,t)},insert:function(t,e){for(var r=0,i=0;i<e.length;++i)r+=e[i].height;this.insertInner(t-this.first,e,r)},remove:function(t,e){this.removeInner(t-this.first,e)},getValue:function(t){var e=re(this,this.first,this.first+this.size);return!1===t?e:e.join(t||this.lineSeparator())},setValue:sn(function(t){var e=le(this.first,0),r=this.first+this.size-1;po(this,{from:e,to:le(r,te(this,r).text.length),text:this.splitLines(t),origin:"setValue",full:!0},!0),this.cm&&Pi(this.cm,0,0),io(this,Ln(e),q)}),replaceRange:function(t,e,r,i){yo(this,t,e=me(this,e),r=r?me(this,r):e,i)},getRange:function(t,e,r){var i=ee(this,me(this,t),me(this,e));return!1===r?i:i.join(r||this.lineSeparator())},getLine:function(t){var e=this.getLineHandle(t);return e&&e.text},getLineHandle:function(t){if(se(this,t))return te(this,t)},getLineNumber:function(t){return ne(t)},getLineHandleVisualStart:function(t){return"number"==typeof t&&(t=te(this,t)),Ve(t)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(t){return me(this,t)},getCursor:function(t){var e=this.sel.primary();return null==t||"head"==t?e.head:"anchor"==t?e.anchor:"end"==t||"to"==t||!1===t?e.to():e.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:sn(function(t,e,r){eo(this,me(this,"number"==typeof t?le(t,e||0):t),null,r)}),setSelection:sn(function(t,e,r){eo(this,me(this,t),me(this,e||t),r)}),extendSelection:sn(function(t,e,r){Zn(this,me(this,t),e&&me(this,e),r)}),extendSelections:sn(function(t,e){Jn(this,ge(this,t),e)}),extendSelectionsBy:sn(function(t,e){Jn(this,ge(this,Q(this.sel.ranges,t)),e)}),setSelections:sn(function(t,e,r){if(t.length){for(var i=[],n=0;n<t.length;n++)i[n]=new Sn(me(this,t[n].anchor),me(this,t[n].head));null==e&&(e=Math.min(t.length-1,this.sel.primIndex)),io(this,An(this.cm,i,e),r)}}),addSelection:sn(function(t,e,r){var i=this.sel.ranges.slice(0);i.push(new Sn(me(this,t),me(this,e||t))),io(this,An(this.cm,i,i.length-1),r)}),getSelection:function(t){for(var e,r=this.sel.ranges,i=0;i<r.length;i++){var n=ee(this,r[i].from(),r[i].to());e=e?e.concat(n):n}return!1===t?e:e.join(t||this.lineSeparator())},getSelections:function(t){for(var e=[],r=this.sel.ranges,i=0;i<r.length;i++){var n=ee(this,r[i].from(),r[i].to());!1!==t&&(n=n.join(t||this.lineSeparator())),e[i]=n}return e},replaceSelection:function(t,e,r){for(var i=[],n=0;n<this.sel.ranges.length;n++)i[n]=t;this.replaceSelections(i,e,r||"+input")},replaceSelections:sn(function(t,e,r){for(var i=[],n=this.sel,o=0;o<n.ranges.length;o++){var s=n.ranges[o];i[o]={from:s.from(),to:s.to(),text:this.splitLines(t[o]),origin:r}}for(var a=e&&"end"!=e&&function(t,e,r){for(var i=[],n=le(t.first,0),o=n,s=0;s<e.length;s++){var a=e[s],l=Rn(a.from,n,o),h=Rn(Nn(a),n,o);if(n=a.to,o=h,"around"==r){var c=t.sel.ranges[s],u=he(c.head,c.anchor)<0;i[s]=new Sn(u?h:l,u?l:h)}else i[s]=new Sn(l,l)}return new Cn(i,t.sel.primIndex)}(this,i,e),l=i.length-1;0<=l;l--)po(this,i[l]);a?ro(this,a):this.cm&&Di(this.cm)}),undo:sn(function(){go(this,"undo")}),redo:sn(function(){go(this,"redo")}),undoSelection:sn(function(){go(this,"undo",!0)}),redoSelection:sn(function(){go(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,r=0,i=0;i<t.done.length;i++)t.done[i].ranges||++e;for(var n=0;n<t.undone.length;n++)t.undone[n].ranges||++r;return{undo:e,redo:r}},clearHistory:function(){this.history=new zn(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(t){return t&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(t){return this.history.generation==(t||this.cleanGeneration)},getHistory:function(){return{done:Qn(this.history.done),undone:Qn(this.history.undone)}},setHistory:function(t){var e=this.history=new zn(this.history.maxGeneration);e.done=Qn(t.done.slice(0),null,!0),e.undone=Qn(t.undone.slice(0),null,!0)},setGutterMarker:sn(function(t,r,i){return bo(this,t,"gutter",function(t){var e=t.gutterMarkers||(t.gutterMarkers={});return!(e[r]=i)&&rt(e)&&(t.gutterMarkers=null),1})}),clearGutter:sn(function(e){var r=this;this.iter(function(t){t.gutterMarkers&&t.gutterMarkers[e]&&bo(r,t,"gutter",function(){return t.gutterMarkers[e]=null,rt(t.gutterMarkers)&&(t.gutterMarkers=null),1})})}),lineInfo:function(t){var e;if("number"==typeof t){if(!se(this,t))return null;if(!(t=te(this,e=t)))return null}else if(null==(e=ne(t)))return null;return{line:e,handle:t,text:t.text,gutterMarkers:t.gutterMarkers,textClass:t.textClass,bgClass:t.bgClass,wrapClass:t.wrapClass,widgets:t.widgets}},addLineClass:sn(function(t,r,i){return bo(this,t,"gutter"==r?"gutter":"class",function(t){var e="text"==r?"textClass":"background"==r?"bgClass":"gutter"==r?"gutterClass":"wrapClass";if(t[e]){if(w(i).test(t[e]))return;t[e]+=" "+i}else t[e]=i;return 1})}),removeLineClass:sn(function(t,o,s){return bo(this,t,"gutter"==o?"gutter":"class",function(t){var e="text"==o?"textClass":"background"==o?"bgClass":"gutter"==o?"gutterClass":"wrapClass",r=t[e];if(r){if(null==s)t[e]=null;else{var i=r.match(w(s));if(!i)return;var n=i.index+i[0].length;t[e]=r.slice(0,i.index)+(i.index&&n!=r.length?" ":"")+r.slice(n)||null}return 1}})}),addLineWidget:sn(function(t,e,r){return n=t,o=new Co(i=this,e,r),(s=i.cm)&&o.noHScroll&&(s.display.alignWidgets=!0),bo(i,n,"widget",function(t){var e=t.widgets||(t.widgets=[]);if(null==o.insertAt?e.push(o):e.splice(Math.min(e.length-1,Math.max(0,o.insertAt)),0,o),o.line=t,s&&!$e(i,t)){var r=Xe(t)<i.scrollTop;ie(t,t.height+Sr(o)),r&&Mi(s,o.height),s.curOp.forceUpdate=!0}return 1}),s&&mr(s,"lineWidgetAdded",s,o,"number"==typeof n?n:ne(n)),o;var i,n,o,s}),removeLineWidget:function(t){t.clear()},markText:function(t,e,r){return No(this,me(this,t),me(this,e),r,r&&r.type||"range")},setBookmark:function(t,e){var r={replacedWith:e&&(null==e.nodeType?e.widget:e),insertLeft:e&&e.insertLeft,clearWhenEmpty:!1,shared:e&&e.shared,handleMouseEvents:e&&e.handleMouseEvents};return No(this,t=me(this,t),t,r,"bookmark")},findMarksAt:function(t){var e=[],r=te(this,(t=me(this,t)).line).markedSpans;if(r)for(var i=0;i<r.length;++i){var n=r[i];(null==n.from||n.from<=t.ch)&&(null==n.to||n.to>=t.ch)&&e.push(n.marker.parent||n.marker)}return e},findMarks:function(n,o,s){n=me(this,n),o=me(this,o);var a=[],l=n.line;return this.iter(n.line,o.line+1,function(t){var e=t.markedSpans;if(e)for(var r=0;r<e.length;r++){var i=e[r];null!=i.to&&l==n.line&&n.ch>=i.to||null==i.from&&l!=n.line||null!=i.from&&l==o.line&&i.from>=o.ch||s&&!s(i.marker)||a.push(i.marker.parent||i.marker)}++l}),a},getAllMarks:function(){var i=[];return this.iter(function(t){var e=t.markedSpans;if(e)for(var r=0;r<e.length;++r)null!=e[r].from&&i.push(e[r].marker)}),i},posFromIndex:function(r){var i,n=this.first,o=this.lineSeparator().length;return this.iter(function(t){var e=t.text.length+o;if(r<e)return i=r,!0;r-=e,++n}),me(this,le(n,i))},indexFromPos:function(t){var e=(t=me(this,t)).ch;if(t.line<this.first||t.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,t.line,function(t){e+=t.text.length+r}),e},copy:function(t){var e=new Do(re(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return e.scrollTop=this.scrollTop,e.scrollLeft=this.scrollLeft,e.sel=this.sel,e.extend=!1,t&&(e.history.undoDepth=this.history.undoDepth,e.setHistory(this.getHistory())),e},linkedDoc:function(t){t=t||{};var e=this.first,r=this.first+this.size;null!=t.from&&t.from>e&&(e=t.from),null!=t.to&&t.to<r&&(r=t.to);var i=new Do(re(this,e,r),t.mode||this.modeOption,e,this.lineSep,this.direction);return t.sharedHist&&(i.history=this.history),(this.linked||(this.linked=[])).push({doc:i,sharedHist:t.sharedHist}),i.linked=[{doc:this,isParent:!0,sharedHist:t.sharedHist}],function(t,e){for(var r=0;r<e.length;r++){var i=e[r],n=i.find(),o=t.clipPos(n.from),s=t.clipPos(n.to);if(he(o,s)){var a=No(t,o,s,i.primary,i.primary.type);i.markers.push(a),a.parent=i}}}(i,Io(this)),i},unlinkDoc:function(t){if(t instanceof Is&&(t=t.doc),this.linked)for(var e=0;e<this.linked.length;++e){if(this.linked[e].doc==t){this.linked.splice(e,1),t.unlinkDoc(this),Ro(Io(this));break}}if(t.history==this.history){var r=[t.id];Un(t,function(t){return r.push(t.id)},!0),t.history=new zn(null),t.history.done=Qn(this.history.done,r),t.history.undone=Qn(this.history.undone,r)}},iterLinkedDocs:function(t){Un(this,t)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(t){return this.lineSep?t.split(this.lineSep):Ht(t)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:sn(function(t){var e;"rtl"!=t&&(t="ltr"),t!=this.direction&&(this.direction=t,this.iter(function(t){return t.order=null}),this.cm&&rn(e=this.cm,function(){Hn(e),mi(e)}))})}),Do.prototype.eachLine=Do.prototype.iter;var Po=0;function Bo(t){var n=this;if(Uo(n),!wt(n,t)&&!Ar(n.display,t)){At(t),T&&(Po=+new Date);var o=pi(n,t,!0),e=t.dataTransfer.files;if(o&&!n.isReadOnly())if(e&&e.length&&window.FileReader&&window.File)for(var s=e.length,a=Array(s),l=0,r=function(t,r){if(!n.options.allowDropFileTypes||-1!=H(n.options.allowDropFileTypes,t.type)){var i=new FileReader;i.onload=nn(n,function(){var t=i.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(t)&&(t=""),a[r]=t,++l==s){var e={from:o=me(n.doc,o),to:o,text:n.doc.splitLines(a.join(n.doc.lineSeparator())),origin:"paste"};po(n.doc,e),ro(n.doc,Ln(o,Nn(e)))}}),i.readAsText(t)}},i=0;i<s;++i)r(e[i],i);else{if(n.state.draggingText&&-1<n.doc.sel.contains(o))return n.state.draggingText(t),void setTimeout(function(){return n.display.input.focus()},20);try{var h=t.dataTransfer.getData("Text");if(h){var c;if(n.state.draggingText&&!n.state.draggingText.copy&&(c=n.listSelections()),no(n.doc,Ln(o,o)),c)for(var u=0;u<c.length;++u)yo(n.doc,"",c[u].anchor,c[u].head,"drag");n.replaceSelection(h,"around","paste"),n.display.input.focus()}}catch(t){}}}}function Uo(t){t.display.dragCursor&&(t.display.lineSpace.removeChild(t.display.dragCursor),t.display.dragCursor=null)}function Fo(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),r=[],i=0;i<t.length;i++){var n=t[i].CodeMirror;n&&r.push(n)}r.length&&r[0].operation(function(){for(var t=0;t<r.length;t++)e(r[t])})}}var Ho=!1;function zo(){var t;Ho||(xt(window,"resize",function(){null==t&&(t=setTimeout(function(){t=null,Fo(Wo)},100))}),xt(window,"blur",function(){return Fo(Li)}),Ho=!0)}function Wo(t){var e=t.display;e.cachedCharWidth=e.cachedTextHeight=e.cachedPaddingH=null,e.scrollbarsClipped=!1,t.setSize()}for(var qo={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Go=0;Go<10;Go++)qo[Go+48]=qo[Go+96]=String(Go);for(var jo=65;jo<=90;jo++)qo[jo]=String.fromCharCode(jo);for(var Vo=1;Vo<=12;Vo++)qo[Vo+111]=qo[Vo+63235]="F"+Vo;var Yo={};function Ko(t){var e,r,i,n,o=t.split(/-(?!$)/);t=o[o.length-1];for(var s=0;s<o.length-1;s++){var a=o[s];if(/^(cmd|meta|m)$/i.test(a))n=!0;else if(/^a(lt)?$/i.test(a))e=!0;else if(/^(c|ctrl|control)$/i.test(a))r=!0;else{if(!/^s(hift)?$/i.test(a))throw new Error("Unrecognized modifier name: "+a);i=!0}}return e&&(t="Alt-"+t),r&&(t="Ctrl-"+t),n&&(t="Cmd-"+t),i&&(t="Shift-"+t),t}function $o(t){var e={};for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==i){delete t[r];continue}for(var n=Q(r.split(" "),Ko),o=0;o<n.length;o++){var s=void 0,a=void 0;s=o==n.length-1?(a=n.join(" "),i):(a=n.slice(0,o+1).join(" "),"...");var l=e[a];if(l){if(l!=s)throw new Error("Inconsistent bindings for "+a)}else e[a]=s}delete t[r]}for(var h in e)t[h]=e[h];return t}function Qo(t,e,r,i){var n=(e=ts(e)).call?e.call(t,i):e[t];if(!1===n)return"nothing";if("..."===n)return"multi";if(null!=n&&r(n))return"handled";if(e.fallthrough){if("[object Array]"!=Object.prototype.toString.call(e.fallthrough))return Qo(t,e.fallthrough,r,i);for(var o=0;o<e.fallthrough.length;o++){var s=Qo(t,e.fallthrough[o],r,i);if(s)return s}}}function Xo(t){var e="string"==typeof t?t:qo[t.keyCode];return"Ctrl"==e||"Alt"==e||"Shift"==e||"Mod"==e}function Zo(t,e,r){var i=t;return e.altKey&&"Alt"!=i&&(t="Alt-"+t),(v?e.metaKey:e.ctrlKey)&&"Ctrl"!=i&&(t="Ctrl-"+t),(v?e.ctrlKey:e.metaKey)&&"Cmd"!=i&&(t="Cmd-"+t),!r&&e.shiftKey&&"Shift"!=i&&(t="Shift-"+t),t}function Jo(t,e){if(g&&34==t.keyCode&&t.char)return!1;var r=qo[t.keyCode];return null!=r&&!t.altGraphKey&&(3==t.keyCode&&t.code&&(r=t.code),Zo(r,t,e))}function ts(t){return"string"==typeof t?Yo[t]:t}function es(e,t){for(var r=e.doc.sel.ranges,i=[],n=0;n<r.length;n++){for(var o=t(r[n]);i.length&&he(o.from,$(i).to)<=0;){var s=i.pop();if(he(s.from,o.from)<0){o.from=s.from;break}}i.push(o)}rn(e,function(){for(var t=i.length-1;0<=t;t--)yo(e.doc,"",i[t].from,i[t].to,"+delete");Di(e)})}function rs(t,e,r){var i=ot(t.text,e+r,r);return i<0||i>t.text.length?null:i}function is(t,e,r){var i=rs(t,e.ch,r);return null==i?null:new le(e.line,i,r<0?"after":"before")}function ns(t,e,r,i,n){if(t){var o=vt(r,e.doc.direction);if(o){var s,a=n<0?$(o):o[0],l=n<0==(1==a.level)?"after":"before";if(0<a.level||"rtl"==e.doc.direction){var h=Ur(e,r);s=n<0?r.text.length-1:0;var c=Fr(e,h,s).top;s=st(function(t){return Fr(e,h,t).top==c},n<0==(1==a.level)?a.from:a.to-1,s),"before"==l&&(s=rs(r,s,1))}else s=n<0?a.to:a.from;return new le(i,s,l)}}return new le(i,n<0?r.text.length:0,n<0?"before":"after")}function os(e,r,a,t){var l=vt(r,e.doc.direction);if(!l)return is(r,a,t);a.ch>=r.text.length?(a.ch=r.text.length,a.sticky="before"):a.ch<=0&&(a.ch=0,a.sticky="after");var i=lt(l,a.ch,a.sticky),n=l[i];if("ltr"==e.doc.direction&&n.level%2==0&&(0<t?n.to>a.ch:n.from<a.ch))return is(r,a,t);function h(t,e){return rs(r,t instanceof le?t.ch:t,e)}function o(t){return e.options.lineWrapping?(s=s||Ur(e,r),ni(e,r,s,t)):{begin:0,end:r.text.length}}var s,c=o("before"==a.sticky?h(a,-1):a.ch);if("rtl"==e.doc.direction||1==n.level){var u=1==n.level==t<0,f=h(a,u?1:-1);if(null!=f&&(u?f<=n.to&&f<=c.end:f>=n.from&&f>=c.begin)){var p=u?"before":"after";return new le(a.line,f,p)}}function d(t,e,r){for(var i=function(t,e){return e?new le(a.line,h(t,1),"before"):new le(a.line,t,"after")};0<=t&&t<l.length;t+=e){var n=l[t],o=0<e==(1!=n.level),s=o?r.begin:h(r.end,-1);if(n.from<=s&&s<n.to)return i(s,o);if(s=o?n.from:h(n.to,-1),r.begin<=s&&s<r.end)return i(s,o)}}var m=d(i+t,t,c);if(m)return m;var g=0<t?c.end:h(c.begin,-1);return null==g||0<t&&g==r.text.length||!(m=d(0<t?0:l.length-1,t,o(g)))?null:m}Yo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Yo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Yo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Yo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Yo.default=x?Yo.macDefault:Yo.pcDefault;var ss={selectAll:uo,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),q)},killLine:function(r){return es(r,function(t){if(t.empty()){var e=te(r.doc,t.head.line).text.length;return t.head.ch==e&&t.head.line<r.lastLine()?{from:t.head,to:le(t.head.line+1,0)}:{from:t.head,to:le(t.head.line,e)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return es(e,function(t){return{from:le(t.from().line,0),to:me(e.doc,le(t.to().line+1,0))}})},delLineLeft:function(t){return es(t,function(t){return{from:le(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(r){return es(r,function(t){var e=r.charCoords(t.head,"div").top+5;return{from:r.coordsChar({left:0,top:e},"div"),to:t.from()}})},delWrappedLineRight:function(i){return es(i,function(t){var e=i.charCoords(t.head,"div").top+5,r=i.coordsChar({left:i.display.lineDiv.offsetWidth+100,top:e},"div");return{from:t.from(),to:r}})},undo:function(t){return t.undo()},redo:function(t){return t.redo()},undoSelection:function(t){return t.undoSelection()},redoSelection:function(t){return t.redoSelection()},goDocStart:function(t){return t.extendSelection(le(t.firstLine(),0))},goDocEnd:function(t){return t.extendSelection(le(t.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return as(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return ls(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return function(t,e){var r=te(t.doc,e),i=function(t){for(var e;e=qe(t);)t=e.find(1,!0).line;return t}(r);i!=r&&(e=ne(i));return ns(!0,t,r,e,-1)}(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(r){return r.extendSelectionsBy(function(t){var e=r.cursorCoords(t.head,"div").top+5;return r.coordsChar({left:r.display.lineDiv.offsetWidth+100,top:e},"div")},j)},goLineLeft:function(r){return r.extendSelectionsBy(function(t){var e=r.cursorCoords(t.head,"div").top+5;return r.coordsChar({left:0,top:e},"div")},j)},goLineLeftSmart:function(i){return i.extendSelectionsBy(function(t){var e=i.cursorCoords(t.head,"div").top+5,r=i.coordsChar({left:0,top:e},"div");return r.ch<i.getLine(r.line).search(/\S/)?ls(i,t.head):r},j)},goLineUp:function(t){return t.moveV(-1,"line")},goLineDown:function(t){return t.moveV(1,"line")},goPageUp:function(t){return t.moveV(-1,"page")},goPageDown:function(t){return t.moveV(1,"page")},goCharLeft:function(t){return t.moveH(-1,"char")},goCharRight:function(t){return t.moveH(1,"char")},goColumnLeft:function(t){return t.moveH(-1,"column")},goColumnRight:function(t){return t.moveH(1,"column")},goWordLeft:function(t){return t.moveH(-1,"word")},goGroupRight:function(t){return t.moveH(1,"group")},goGroupLeft:function(t){return t.moveH(-1,"group")},goWordRight:function(t){return t.moveH(1,"word")},delCharBefore:function(t){return t.deleteH(-1,"char")},delCharAfter:function(t){return t.deleteH(1,"char")},delWordBefore:function(t){return t.deleteH(-1,"word")},delWordAfter:function(t){return t.deleteH(1,"word")},delGroupBefore:function(t){return t.deleteH(-1,"group")},delGroupAfter:function(t){return t.deleteH(1,"group")},indentAuto:function(t){return t.indentSelection("smart")},indentMore:function(t){return t.indentSelection("add")},indentLess:function(t){return t.indentSelection("subtract")},insertTab:function(t){return t.replaceSelection("\t")},insertSoftTab:function(t){for(var e=[],r=t.listSelections(),i=t.options.tabSize,n=0;n<r.length;n++){var o=r[n].from(),s=U(t.getLine(o.line),o.ch,i);e.push(K(i-s%i))}t.replaceSelections(e)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(s){return rn(s,function(){for(var t=s.listSelections(),e=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,n=te(s.doc,i.line).text;if(n)if(i.ch==n.length&&(i=new le(i.line,i.ch-1)),0<i.ch)i=new le(i.line,i.ch+1),s.replaceRange(n.charAt(i.ch-1)+n.charAt(i.ch-2),le(i.line,i.ch-2),i,"+transpose");else if(i.line>s.doc.first){var o=te(s.doc,i.line-1).text;o&&(i=new le(i.line,1),s.replaceRange(n.charAt(0)+s.doc.lineSeparator()+o.charAt(o.length-1),le(i.line-1,o.length-1),i,"+transpose"))}e.push(new Sn(i,i))}s.setSelections(e)})},newlineAndIndent:function(i){return rn(i,function(){for(var t=i.listSelections(),e=t.length-1;0<=e;e--)i.replaceRange(i.doc.lineSeparator(),t[e].anchor,t[e].head,"+input");t=i.listSelections();for(var r=0;r<t.length;r++)i.indentLine(t[r].from().line,null,!0);Di(i)})},openLine:function(t){return t.replaceSelection("\n","start")},toggleOverwrite:function(t){return t.toggleOverwrite()}};function as(t,e){var r=te(t.doc,e),i=Ve(r);return i!=r&&(e=ne(i)),ns(!0,t,i,e,1)}function ls(t,e){var r=as(t,e.line),i=te(t.doc,r.line),n=vt(i,t.doc.direction);if(n&&0!=n[0].level)return r;var o=Math.max(0,i.text.search(/\S/)),s=e.line==r.line&&e.ch<=o&&e.ch;return le(r.line,s?0:o,r.sticky)}function hs(t,e,r){if("string"==typeof e&&!(e=ss[e]))return!1;t.display.input.ensurePolled();var i=t.display.shift,n=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),r&&(t.display.shift=!1),n=e(t)!=W}finally{t.display.shift=i,t.state.suppressEdits=!1}return n}var cs=new F;function us(t,e,r,i){var n=t.state.keySeq;if(n){if(Xo(e))return"handled";if(/\'$/.test(e)?t.state.keySeq=null:cs.set(50,function(){t.state.keySeq==n&&(t.state.keySeq=null,t.display.input.reset())}),fs(t,n+" "+e,r,i))return!0}return fs(t,e,r,i)}function fs(t,e,r,i){var n=function(t,e,r){for(var i=0;i<t.state.keyMaps.length;i++){var n=Qo(e,t.state.keyMaps[i],r,t);if(n)return n}return t.options.extraKeys&&Qo(e,t.options.extraKeys,r,t)||Qo(e,t.options.keyMap,r,t)}(t,e,i);return"multi"==n&&(t.state.keySeq=e),"handled"==n&&mr(t,"keyHandled",t,e,r),"handled"!=n&&"multi"!=n||(At(r),Ei(t)),!!n}function ps(e,t){var r=Jo(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?us(e,"Shift-"+r,t,function(t){return hs(e,t,!0)})||us(e,r,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return hs(e,t)}):us(e,r,t,function(t){return hs(e,t)}))}var ds=null;function ms(t){if(this.curOp.focus=I(),!wt(this,t)){T&&k<11&&27==t.keyCode&&(t.returnValue=!1);var e=t.keyCode;this.display.shift=16==e||t.shiftKey;var r,i=ps(this,t);g&&(ds=i?e:null,!i&&88==e&&!Wt&&(x?t.metaKey:t.ctrlKey)&&this.replaceSelection("",null,"cut")),m&&!x&&!i&&46==e&&t.shiftKey&&!t.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=e||/\bCodeMirror-crosshair\b/.test(this.display.lineDiv.className)||(R(r=this.display.lineDiv,"CodeMirror-crosshair"),xt(document,"keyup",n),xt(document,"mouseover",n))}function n(t){18!=t.keyCode&&t.altKey||(C(r,"CodeMirror-crosshair"),kt(document,"keyup",n),kt(document,"mouseover",n))}}function gs(t){16==t.keyCode&&(this.doc.sel.shift=!1),wt(this,t)}function _s(t){if(!(Ar(this.display,t)||wt(this,t)||t.ctrlKey&&!t.altKey||x&&t.metaKey)){var e=t.keyCode,r=t.charCode;if(g&&e==ds)return ds=null,void At(t);if(!g||t.which&&!(t.which<10)||!ps(this,t)){var i,n=String.fromCharCode(null==r?e:r);if("\b"!=n)if(!us(i=this,"'"+n+"'",t,function(t){return hs(i,t,!0)}))this.display.input.onKeyPress(t)}}}var vs,ys,xs=function(t,e,r){this.time=t,this.pos=e,this.button=r};function Ts(t){var e=this,r=e.display;if(!(wt(e,t)||r.activeTouch&&r.input.supportsTouch()))if(r.input.ensurePolled(),r.shift=t.shiftKey,Ar(r,t))y||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));else if(!ws(e,t)){var i,n,o,s=pi(e,t),a=Rt(t),l=s?(i=s,n=a,o=+new Date,ys&&ys.compare(o,i,n)?(vs=ys=null,"triple"):vs&&vs.compare(o,i,n)?(ys=new xs(o,i,n),vs=null,"double"):(vs=new xs(o,i,n),ys=null,"single")):"single";window.focus(),1==a&&e.state.selectingText&&e.state.selectingText(t),s&&function(r,t,i,e,n){var o="Click";"double"==e?o="Double"+o:"triple"==e&&(o="Triple"+o);return us(r,Zo(o=(1==t?"Left":2==t?"Middle":"Right")+o,n),n,function(t){if("string"==typeof t&&(t=ss[t]),!t)return!1;var e=!1;try{r.isReadOnly()&&(r.state.suppressEdits=!0),e=t(r,i)!=W}finally{r.state.suppressEdits=!1}return e})}(e,a,s,l,t)||(1==a?s?function(t,e,r,i){T?setTimeout(P(Ci,t),0):t.curOp.focus=I();var n,o=function(t,e,r){var i=t.getOption("configureMouse"),n=i?i(t,e,r):{};if(null==n.unit){var o=p?r.shiftKey&&r.metaKey:r.altKey;n.unit=o?"rectangle":"single"==e?"char":"double"==e?"word":"line"}null!=n.extend&&!t.doc.extend||(n.extend=t.doc.extend||r.shiftKey);null==n.addNew&&(n.addNew=x?r.metaKey:r.ctrlKey);null==n.moveOnDrag&&(n.moveOnDrag=!(x?r.altKey:r.ctrlKey));return n}(t,r,i),s=t.doc.sel;(t.options.dragDrop&&Pt&&!t.isReadOnly()&&"single"==r&&-1<(n=s.contains(e))&&(he((n=s.ranges[n]).from(),e)<0||0<e.xRel)&&(0<he(n.to(),e)||e.xRel<0)?function(e,r,i,n){var o=e.display,s=!1,a=nn(e,function(t){y&&(o.scroller.draggable=!1),e.state.draggingText=!1,kt(o.wrapper.ownerDocument,"mouseup",a),kt(o.wrapper.ownerDocument,"mousemove",l),kt(o.scroller,"dragstart",h),kt(o.scroller,"drop",a),s||(At(t),n.addNew||Zn(e.doc,i,null,null,n.extend),y||T&&9==k?setTimeout(function(){o.wrapper.ownerDocument.body.focus(),o.input.focus()},20):o.input.focus())}),l=function(t){s=s||10<=Math.abs(r.clientX-t.clientX)+Math.abs(r.clientY-t.clientY)},h=function(){return s=!0};y&&(o.scroller.draggable=!0);(e.state.draggingText=a).copy=!n.moveOnDrag,o.scroller.dragDrop&&o.scroller.dragDrop();xt(o.wrapper.ownerDocument,"mouseup",a),xt(o.wrapper.ownerDocument,"mousemove",l),xt(o.scroller,"dragstart",h),xt(o.scroller,"drop",a),Si(e),setTimeout(function(){return o.input.focus()},20)}:function(g,t,_,v){var s=g.display,y=g.doc;At(t);var x,T,k=y.sel,e=k.ranges;v.addNew&&!v.extend?(T=y.sel.contains(_),x=-1<T?e[T]:new Sn(_,_)):(x=y.sel.primary(),T=y.sel.primIndex);if("rectangle"==v.unit)v.addNew||(x=new Sn(_,_)),_=pi(g,t,!0,!0),T=-1;else{var r=ks(g,_,v.unit);x=v.extend?Xn(x,r.anchor,r.head,v.extend):r}v.addNew?-1==T?(T=e.length,io(y,An(g,e.concat([x]),T),{scroll:!1,origin:"*mouse"})):1<e.length&&e[T].empty()&&"char"==v.unit&&!v.extend?(io(y,An(g,e.slice(0,T).concat(e.slice(T+1)),0),{scroll:!1,origin:"*mouse"}),k=y.sel):to(y,T,x,G):(io(y,new Cn([x],T=0),G),k=y.sel);var b=_;function a(t){if(0!=he(b,t))if(b=t,"rectangle"==v.unit){for(var e=[],r=g.options.tabSize,i=U(te(y,_.line).text,_.ch,r),n=U(te(y,t.line).text,t.ch,r),o=Math.min(i,n),s=Math.max(i,n),a=Math.min(_.line,t.line),l=Math.min(g.lastLine(),Math.max(_.line,t.line));a<=l;a++){var h=te(y,a).text,c=V(h,o,r);o==s?e.push(new Sn(le(a,c),le(a,c))):h.length>c&&e.push(new Sn(le(a,c),le(a,V(h,s,r))))}e.length||e.push(new Sn(_,_)),io(y,An(g,k.ranges.slice(0,T).concat(e),T),{origin:"*mouse",scroll:!1}),g.scrollIntoView(t)}else{var u,f=x,p=ks(g,t,v.unit),d=f.anchor;d=0<he(p.anchor,d)?(u=p.head,pe(f.from(),p.anchor)):(u=p.anchor,fe(f.to(),p.head));var m=k.ranges.slice(0);m[T]=function(t,e){var r=e.anchor,i=e.head,n=te(t.doc,r.line);if(0==he(r,i)&&r.sticky==i.sticky)return e;var o=vt(n);if(!o)return e;var s=lt(o,r.ch,r.sticky),a=o[s];if(a.from!=r.ch&&a.to!=r.ch)return e;var l,h=s+(a.from==r.ch==(1!=a.level)?0:1);if(0==h||h==o.length)return e;if(i.line!=r.line)l=0<(i.line-r.line)*("ltr"==t.doc.direction?1:-1);else{var c=lt(o,i.ch,i.sticky),u=c-s||(i.ch-r.ch)*(1==a.level?-1:1);l=c==h-1||c==h?u<0:0<u}var f=o[h+(l?-1:0)],p=l==(1==f.level),d=p?f.from:f.to,m=p?"after":"before";return r.ch==d&&r.sticky==m?e:new Sn(new le(r.line,d,m),i)}(g,new Sn(me(y,d),u)),io(y,An(g,m,T),G)}}var l=s.wrapper.getBoundingClientRect(),h=0;function i(t){g.state.selectingText=!1,h=1/0,t&&(At(t),s.input.focus()),kt(s.wrapper.ownerDocument,"mousemove",n),kt(s.wrapper.ownerDocument,"mouseup",o),y.history.lastSelOrigin=null}var n=nn(g,function(t){(0!==t.buttons&&Rt(t)?function t(e){var r=++h,i=pi(g,e,!0,"rectangle"==v.unit);if(i)if(0!=he(i,b)){g.curOp.focus=I(),a(i);var n=Ii(s,y);(i.line>=n.to||i.line<n.from)&&setTimeout(nn(g,function(){h==r&&t(e)}),150)}else{var o=e.clientY<l.top?-20:e.clientY>l.bottom?20:0;o&&setTimeout(nn(g,function(){h==r&&(s.scroller.scrollTop+=o,t(e))}),50)}}:i)(t)}),o=nn(g,i);g.state.selectingText=o,xt(s.wrapper.ownerDocument,"mousemove",n),xt(s.wrapper.ownerDocument,"mouseup",o)})(t,i,e,o)}(e,s,l,t):It(t)==r.scroller&&At(t):2==a?(s&&Zn(e.doc,s),setTimeout(function(){return r.input.focus()},20)):3==a&&(b?e.display.input.onContextMenu(t):Si(e)))}}function ks(t,e,r){if("char"==r)return new Sn(e,e);if("word"==r)return t.findWordAt(e);if("line"==r)return new Sn(le(e.line,0),me(t.doc,le(e.line+1,0)));var i=r(t,e);return new Sn(i.from,i.to)}function bs(t,e,r,i){var n,o;if(e.touches)n=e.touches[0].clientX,o=e.touches[0].clientY;else try{n=e.clientX,o=e.clientY}catch(e){return!1}if(n>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&At(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!Ct(t,r))return Nt(e);o-=a.top-s.viewOffset;for(var l=0;l<t.display.gutterSpecs.length;++l){var h=s.gutters.childNodes[l];if(h&&h.getBoundingClientRect().right>=n)return bt(t,r,t,oe(t.doc,o),t.display.gutterSpecs[l].className,e),Nt(e)}}function ws(t,e){return bs(t,e,"gutterClick",!0)}function Es(t,e){var r,i;Ar(t.display,e)||(i=e,Ct(r=t,"gutterContextMenu")&&bs(r,i,"gutterContextMenu",!1))||wt(t,e,"contextmenu")||b||t.display.input.onContextMenu(e)}function Cs(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Vr(t)}xs.prototype.compare=function(t,e,r){return this.time+400>t&&0==he(e,this.pos)&&r==this.button};var Ss={toString:function(){return"CodeMirror.Init"}},As={},Ls={};function Ns(t,e,r){if(!e!=!(r&&r!=Ss)){var i=t.display.dragFunctions,n=e?xt:kt;n(t.display.scroller,"dragstart",i.start),n(t.display.scroller,"dragenter",i.enter),n(t.display.scroller,"dragover",i.over),n(t.display.scroller,"dragleave",i.leave),n(t.display.scroller,"drop",i.drop)}}function Os(t){t.options.lineWrapping?(R(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(C(t.display.wrapper,"CodeMirror-wrap"),Je(t)),fi(t),mi(t),Vr(t),setTimeout(function(){return ji(t)},100)}function Is(t,e){var r=this;if(!(this instanceof Is))return new Is(t,e);this.options=e=e?B(e):{},B(As,e,!1);var i=e.value;"string"==typeof i?i=new Do(i,e.mode,null,e.lineSeparator,e.direction):e.mode&&(i.modeOption=e.mode),this.doc=i;var n=new Is.inputStyles[e.inputStyle](this),o=this.display=new xn(t,i,n,e);for(var s in Cs(o.wrapper.CodeMirror=this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ki(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new F,keySeq:null,specialChars:null},e.autofocus&&!f&&o.input.focus(),T&&k<11&&setTimeout(function(){return r.display.input.reset(!0)},20),function(n){var o=n.display;xt(o.scroller,"mousedown",nn(n,Ts)),xt(o.scroller,"dblclick",T&&k<11?nn(n,function(t){if(!wt(n,t)){var e=pi(n,t);if(e&&!ws(n,t)&&!Ar(n.display,t)){At(t);var r=n.findWordAt(e);Zn(n.doc,r.anchor,r.head)}}}):function(t){return wt(n,t)||At(t)});xt(o.scroller,"contextmenu",function(t){return Es(n,t)});var r,i={end:0};function s(){o.activeTouch&&(r=setTimeout(function(){return o.activeTouch=null},1e3),(i=o.activeTouch).end=+new Date)}function a(t,e){if(null==e.left)return 1;var r=e.left-t.left,i=e.top-t.top;return 400<r*r+i*i}xt(o.scroller,"touchstart",function(t){if(!wt(n,t)&&!function(t){if(1==t.touches.length){var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}}(t)&&!ws(n,t)){o.input.ensurePolled(),clearTimeout(r);var e=+new Date;o.activeTouch={start:e,moved:!1,prev:e-i.end<=300?i:null},1==t.touches.length&&(o.activeTouch.left=t.touches[0].pageX,o.activeTouch.top=t.touches[0].pageY)}}),xt(o.scroller,"touchmove",function(){o.activeTouch&&(o.activeTouch.moved=!0)}),xt(o.scroller,"touchend",function(t){var e=o.activeTouch;if(e&&!Ar(o,t)&&null!=e.left&&!e.moved&&new Date-e.start<300){var r,i=n.coordsChar(o.activeTouch,"page");r=!e.prev||a(e,e.prev)?new Sn(i,i):!e.prev.prev||a(e,e.prev.prev)?n.findWordAt(i):new Sn(le(i.line,0),me(n.doc,le(i.line+1,0))),n.setSelection(r.anchor,r.head),n.focus(),At(t)}s()}),xt(o.scroller,"touchcancel",s),xt(o.scroller,"scroll",function(){o.scroller.clientHeight&&(Fi(n,o.scroller.scrollTop),zi(n,o.scroller.scrollLeft,!0),bt(n,"scroll",n))}),xt(o.scroller,"mousewheel",function(t){return En(n,t)}),xt(o.scroller,"DOMMouseScroll",function(t){return En(n,t)}),xt(o.wrapper,"scroll",function(){return o.wrapper.scrollTop=o.wrapper.scrollLeft=0}),o.dragFunctions={enter:function(t){wt(n,t)||Ot(t)},over:function(t){wt(n,t)||(function(t,e){var r=pi(t,e);if(r){var i=document.createDocumentFragment();ki(t,r,i),t.display.dragCursor||(t.display.dragCursor=N("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),A(t.display.dragCursor,i)}}(n,t),Ot(t))},start:function(t){return function(t,e){if(T&&(!t.state.draggingText||new Date-Po<100))Ot(e);else if(!wt(t,e)&&!Ar(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!l)){var r=N("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",g&&(r.width=r.height=1,t.display.wrapper.appendChild(r),r._top=r.offsetTop),e.dataTransfer.setDragImage(r,0,0),g&&r.parentNode.removeChild(r)}}(n,t)},drop:nn(n,Bo),leave:function(t){wt(n,t)||Uo(n)}};var t=o.input.getField();xt(t,"keyup",function(t){return gs.call(n,t)}),xt(t,"keydown",nn(n,ms)),xt(t,"keypress",nn(n,_s)),xt(t,"focus",function(t){return Ai(n,t)}),xt(t,"blur",function(t){return Li(n,t)})}(this),zo(),Qi(this),this.curOp.forceUpdate=!0,Fn(this,i),e.autofocus&&!f||this.hasFocus()?setTimeout(P(Ai,this),20):Li(this),Ls)Ls.hasOwnProperty(s)&&Ls[s](this,e[s],Ss);gn(this),e.finishInit&&e.finishInit(this);for(var a=0;a<Rs.length;++a)Rs[a](this);Xi(this),y&&e.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}Is.defaults=As,Is.optionHandlers=Ls;var Rs=[];function Ms(t,e,r,i){var n,o=t.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?n=Te(t,e).state:r="prev");var s=t.options.tabSize,a=te(o,e),l=U(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var h,c=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==r&&((h=o.mode.indent(n,a.text.slice(c.length),a.text))==W||150<h)){if(!i)return;r="prev"}}else h=0,r="not";"prev"==r?h=e>o.first?U(te(o,e-1).text,null,s):0:"add"==r?h=l+t.options.indentUnit:"subtract"==r?h=l-t.options.indentUnit:"number"==typeof r&&(h=l+r),h=Math.max(0,h);var u="",f=0;if(t.options.indentWithTabs)for(var p=Math.floor(h/s);p;--p)f+=s,u+="\t";if(f<h&&(u+=K(h-f)),u!=c)return yo(o,u,le(e,0),le(e,c.length),"+input"),!(a.stateAfter=null);for(var d=0;d<o.sel.ranges.length;d++){var m=o.sel.ranges[d];if(m.head.line==e&&m.head.ch<c.length){var g=le(e,c.length);to(o,d,new Sn(g,g));break}}}Is.defineInitHook=function(t){return Rs.push(t)};var Ds=null;function Ps(t){Ds=t}function Bs(t,e,r,i,n){var o=t.doc;t.display.shift=!1,i=i||o.sel;var s=new Date-200,a="paste"==n||t.state.pasteIncoming>s,l=Ht(e),h=null;if(a&&1<i.ranges.length)if(Ds&&Ds.text.join("\n")==e){if(i.ranges.length%Ds.text.length==0){h=[];for(var c=0;c<Ds.text.length;c++)h.push(o.splitLines(Ds.text[c]))}}else l.length==i.ranges.length&&t.options.pasteLinesPerSelection&&(h=Q(l,function(t){return[t]}));for(var u=t.curOp.updateInput,f=i.ranges.length-1;0<=f;f--){var p=i.ranges[f],d=p.from(),m=p.to();p.empty()&&(r&&0<r?d=le(d.line,d.ch-r):t.state.overwrite&&!a?m=le(m.line,Math.min(te(o,m.line).text.length,m.ch+$(l).length)):a&&Ds&&Ds.lineWise&&Ds.text.join("\n")==e&&(d=m=le(d.line,0)));var g={from:d,to:m,text:h?h[f%h.length]:l,origin:n||(a?"paste":t.state.cutIncoming>s?"cut":"+input")};po(t.doc,g),mr(t,"inputRead",t,g)}e&&!a&&Fs(t,e),Di(t),t.curOp.updateInput<2&&(t.curOp.updateInput=u),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Us(t,e){var r=t.clipboardData&&t.clipboardData.getData("Text");return r&&(t.preventDefault(),e.isReadOnly()||e.options.disableInput||rn(e,function(){return Bs(e,r,0,null,"paste")}),1)}function Fs(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var r=t.doc.sel,i=r.ranges.length-1;0<=i;i--){var n=r.ranges[i];if(!(100<n.head.ch||i&&r.ranges[i-1].head.line==n.head.line)){var o=t.getModeAt(n.head),s=!1;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++)if(-1<e.indexOf(o.electricChars.charAt(a))){s=Ms(t,n.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(te(t.doc,n.head.line).text.slice(0,n.head.ch))&&(s=Ms(t,n.head.line,"smart"));s&&mr(t,"electricInput",t,n.head.line)}}}function Hs(t){for(var e=[],r=[],i=0;i<t.doc.sel.ranges.length;i++){var n=t.doc.sel.ranges[i].head.line,o={anchor:le(n,0),head:le(n+1,0)};r.push(o),e.push(t.getRange(o.anchor,o.head))}return{text:e,ranges:r}}function zs(t,e,r,i){t.setAttribute("autocorrect",r?"":"off"),t.setAttribute("autocapitalize",i?"":"off"),t.setAttribute("spellcheck",!!e)}function Ws(){var t=N("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),e=N("div",[t],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return y?t.style.width="1000px":t.setAttribute("wrap","off"),c&&(t.style.border="1px solid black"),zs(t),e}function qs(i,n,o,t,s){var e=n,r=o,a=te(i,n.line);function l(t){var e,r;if(null==(e=s?os(i.cm,a,n,o):is(a,n,o))){if(t||(r=n.line+o)<i.first||r>=i.first+i.size||(n=new le(r,n.ch,n.sticky),!(a=te(i,r))))return;n=ns(s,i.cm,a,n.line,o)}else n=e;return 1}if("char"==t)l();else if("column"==t)l(!0);else if("word"==t||"group"==t)for(var h=null,c="group"==t,u=i.cm&&i.cm.getHelper(n,"wordChars"),f=!0;!(o<0)||l(!f);f=!1){var p=a.text.charAt(n.ch)||"\n",d=et(p,u)?"w":c&&"\n"==p?"n":!c||/\s/.test(p)?null:"p";if(!c||f||d||(d="s"),h&&h!=d){o<0&&(o=1,l(),n.sticky="after");break}if(d&&(h=d),0<o&&!l(!f))break}var m=ho(i,n,e,r,!0);return ce(e,m)&&(m.hitSide=!0),m}function Gs(t,e,r,i){var n,o,s=t.doc,a=e.left;if("page"==i){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),h=Math.max(l-.5*ai(t.display),3);n=(0<r?e.bottom:e.top)+r*h}else"line"==i&&(n=0<r?e.bottom+3:e.top-3);for(;(o=ri(t,a,n)).outside;){if(r<0?n<=0:n>=s.height){o.hitSide=!0;break}n+=5*r}return o}function js(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new F,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null}function Vs(t,e){var r=Br(t,e.line);if(!r||r.hidden)return null;var i=te(t.doc,e.line),n=Dr(r,i,e.line),o=vt(i,t.doc.direction),s="left";o&&(s=lt(o,e.ch)%2?"right":"left");var a=Wr(n.map,e.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function Ys(t,e){return e&&(t.bad=!0),t}function Ks(t,e,r){var i;if(e==t.display.lineDiv){if(!(i=t.display.lineDiv.childNodes[r]))return Ys(t.clipPos(le(t.display.viewTo-1)),!0);e=null,r=0}else for(i=e;;i=i.parentNode){if(!i||i==t.display.lineDiv)return null;if(i.parentNode&&i.parentNode==t.display.lineDiv)break}for(var n=0;n<t.display.view.length;n++){var o=t.display.view[n];if(o.node==i)return $s(o,e,r)}}function $s(h,t,e){var r=h.text.firstChild,i=!1;if(!t||!O(r,t))return Ys(le(ne(h.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[e],e=0,!t)){var n=h.rest?$(h.rest):h.line;return Ys(le(ne(n),n.text.length),i)}var o=3==t.nodeType?t:null,s=t;for(o||1!=t.childNodes.length||3!=t.firstChild.nodeType||(o=t.firstChild,e=e&&o.nodeValue.length);s.parentNode!=r;)s=s.parentNode;var c=h.measure,u=c.maps;function a(t,e,r){for(var i=-1;i<(u?u.length:0);i++)for(var n=i<0?c.map:u[i],o=0;o<n.length;o+=3){var s=n[o+2];if(s==t||s==e){var a=ne(i<0?h.line:h.rest[i]),l=n[o]+r;return(r<0||s!=t)&&(l=n[o+(r?1:0)]),le(a,l)}}}var l=a(o,s,e);if(l)return Ys(l,i);for(var f=s.nextSibling,p=o?o.nodeValue.length-e:0;f;f=f.nextSibling){if(l=a(f,f.firstChild,0))return Ys(le(l.line,l.ch-p),i);p+=f.textContent.length}for(var d=s.previousSibling,m=e;d;d=d.previousSibling){if(l=a(d,d.firstChild,-1))return Ys(le(l.line,l.ch+m),i);m+=d.textContent.length}}js.prototype.init=function(t){var e=this,s=this,a=s.cm,l=s.div=t.lineDiv;function r(t){if(!wt(a,t)){if(a.somethingSelected())Ps({lineWise:!1,text:a.getSelections()}),"cut"==t.type&&a.replaceSelection("",null,"cut");else{if(!a.options.lineWiseCopyCut)return;var e=Hs(a);Ps({lineWise:!0,text:e.text}),"cut"==t.type&&a.operation(function(){a.setSelections(e.ranges,0,q),a.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var r=Ds.text.join("\n");if(t.clipboardData.setData("Text",r),t.clipboardData.getData("Text")==r)return void t.preventDefault()}var i=Ws(),n=i.firstChild;a.display.lineSpace.insertBefore(i,a.display.lineSpace.firstChild),n.value=Ds.text.join("\n");var o=document.activeElement;D(n),setTimeout(function(){a.display.lineSpace.removeChild(i),o.focus(),o==l&&s.showPrimarySelection()},50)}}zs(l,a.options.spellcheck,a.options.autocorrect,a.options.autocapitalize),xt(l,"paste",function(t){wt(a,t)||Us(t,a)||k<=11&&setTimeout(nn(a,function(){return e.updateFromDOM()}),20)}),xt(l,"compositionstart",function(t){e.composing={data:t.data,done:!1}}),xt(l,"compositionupdate",function(t){e.composing||(e.composing={data:t.data,done:!1})}),xt(l,"compositionend",function(t){e.composing&&(t.data!=e.composing.data&&e.readFromDOMSoon(),e.composing.done=!0)}),xt(l,"touchstart",function(){return s.forceCompositionEnd()}),xt(l,"input",function(){e.composing||e.readFromDOMSoon()}),xt(l,"copy",r),xt(l,"cut",r)},js.prototype.prepareSelection=function(){var t=Ti(this.cm,!1);return t.focus=this.cm.state.focused,t},js.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},js.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},js.prototype.showPrimarySelection=function(){var t=this.getSelection(),e=this.cm,r=e.doc.sel.primary(),i=r.from(),n=r.to();if(e.display.viewTo==e.display.viewFrom||i.line>=e.display.viewTo||n.line<e.display.viewFrom)t.removeAllRanges();else{var o=Ks(e,t.anchorNode,t.anchorOffset),s=Ks(e,t.focusNode,t.focusOffset);if(!o||o.bad||!s||s.bad||0!=he(pe(o,s),i)||0!=he(fe(o,s),n)){var a=e.display.view,l=i.line>=e.display.viewFrom&&Vs(e,i)||{node:a[0].measure.map[2],offset:0},h=n.line<e.display.viewTo&&Vs(e,n);if(!h){var c=a[a.length-1].measure,u=c.maps?c.maps[c.maps.length-1]:c.map;h={node:u[u.length-1],offset:u[u.length-2]-u[u.length-3]}}if(l&&h){var f,p=t.rangeCount&&t.getRangeAt(0);try{f=E(l.node,l.offset,h.offset,h.node)}catch(t){}f&&(!m&&e.state.focused?(t.collapse(l.node,l.offset),f.collapsed||(t.removeAllRanges(),t.addRange(f))):(t.removeAllRanges(),t.addRange(f)),p&&null==t.anchorNode?t.addRange(p):m&&this.startGracePeriod()),this.rememberSelection()}else t.removeAllRanges()}}},js.prototype.startGracePeriod=function(){var t=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){t.gracePeriod=!1,t.selectionChanged()&&t.cm.operation(function(){return t.cm.curOp.selectionChanged=!0})},20)},js.prototype.showMultipleSelections=function(t){A(this.cm.display.cursorDiv,t.cursors),A(this.cm.display.selectionDiv,t.selection)},js.prototype.rememberSelection=function(){var t=this.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},js.prototype.selectionInEditor=function(){var t=this.getSelection();if(!t.rangeCount)return!1;var e=t.getRangeAt(0).commonAncestorContainer;return O(this.div,e)},js.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},js.prototype.blur=function(){this.div.blur()},js.prototype.getField=function(){return this.div},js.prototype.supportsTouch=function(){return!0},js.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():rn(this.cm,function(){return e.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))})},js.prototype.selectionChanged=function(){var t=this.getSelection();return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},js.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var t=this.getSelection(),e=this.cm;if(u&&s&&this.cm.display.gutterSpecs.length&&function(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return 1;return}(t.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=Ks(e,t.anchorNode,t.anchorOffset),i=Ks(e,t.focusNode,t.focusOffset);r&&i&&rn(e,function(){io(e.doc,Ln(r,i),q),(r.bad||i.bad)&&(e.curOp.selectionChanged=!0)})}}},js.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var t,e,r,i=this.cm,n=i.display,o=i.doc.sel.primary(),s=o.from(),a=o.to();if(0==s.ch&&s.line>i.firstLine()&&(s=le(s.line-1,te(i.doc,s.line-1).length)),a.ch==te(i.doc,a.line).text.length&&a.line<i.lastLine()&&(a=le(a.line+1,0)),s.line<n.viewFrom||a.line>n.viewTo-1)return!1;r=s.line==n.viewFrom||0==(t=di(i,s.line))?(e=ne(n.view[0].line),n.view[0].node):(e=ne(n.view[t].line),n.view[t-1].node.nextSibling);var l,h,c=di(i,a.line);if(h=c==n.view.length-1?(l=n.viewTo-1,n.lineDiv.lastChild):(l=ne(n.view[c+1].line)-1,n.view[c+1].node.previousSibling),!r)return!1;for(var u=i.doc.splitLines(function(l,t,e,h,c){var r="",u=!1,f=l.doc.lineSeparator(),p=!1;function d(){u&&(r+=f,p&&(r+=f),u=p=!1)}function m(t){t&&(d(),r+=t)}function g(t){if(1==t.nodeType){var e=t.getAttribute("cm-text");if(e)return void m(e);var r,i=t.getAttribute("cm-marker");if(i){var n=l.findMarks(le(h,0),le(c+1,0),(a=+i,function(t){return t.id==a}));return void(n.length&&(r=n[0].find(0))&&m(ee(l.doc,r.from,r.to).join(f)))}if("false"==t.getAttribute("contenteditable"))return;var o=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;o&&d();for(var s=0;s<t.childNodes.length;s++)g(t.childNodes[s]);/^(pre|p)$/i.test(t.nodeName)&&(p=!0),o&&(u=!0)}else 3==t.nodeType&&m(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var a}for(;g(t),t!=e;)t=t.nextSibling,p=!1;return r}(i,r,h,e,l)),f=ee(i.doc,le(e,0),le(l,te(i.doc,l).text.length));1<u.length&&1<f.length;)if($(u)==$(f))u.pop(),f.pop(),l--;else{if(u[0]!=f[0])break;u.shift(),f.shift(),e++}for(var p=0,d=0,m=u[0],g=f[0],_=Math.min(m.length,g.length);p<_&&m.charCodeAt(p)==g.charCodeAt(p);)++p;for(var v=$(u),y=$(f),x=Math.min(v.length-(1==u.length?p:0),y.length-(1==f.length?p:0));d<x&&v.charCodeAt(v.length-d-1)==y.charCodeAt(y.length-d-1);)++d;if(1==u.length&&1==f.length&&e==s.line)for(;p&&p>s.ch&&v.charCodeAt(v.length-d-1)==y.charCodeAt(y.length-d-1);)p--,d++;u[u.length-1]=v.slice(0,v.length-d).replace(/^\u200b+/,""),u[0]=u[0].slice(p).replace(/\u200b+$/,"");var T=le(e,p),k=le(l,f.length?$(f).length-d:0);return 1<u.length||u[0]||he(T,k)?(yo(i.doc,u,T,k,"+input"),!0):void 0},js.prototype.ensurePolled=function(){this.forceCompositionEnd()},js.prototype.reset=function(){this.forceCompositionEnd()},js.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},js.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()},80))},js.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||rn(this.cm,function(){return mi(t.cm)})},js.prototype.setUneditable=function(t){t.contentEditable="false"},js.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||nn(this.cm,Bs)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},js.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},js.prototype.onContextMenu=function(){},js.prototype.resetPosition=function(){},js.prototype.needsContentAttribute=!0;function Qs(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new F,this.hasSelection=!1,this.composing=null}var Xs,Zs,Js,ta,ea;function ra(t,e,i,r){Xs.defaults[t]=e,i&&(Zs[t]=r?function(t,e,r){r!=Ss&&i(t,e,r)}:i)}Qs.prototype.init=function(r){var t=this,i=this,n=this.cm;this.createField(r);var o=this.textarea;function e(t){if(!wt(n,t)){if(n.somethingSelected())Ps({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var e=Hs(n);Ps({lineWise:!0,text:e.text}),"cut"==t.type?n.setSelections(e.ranges,null,q):(i.prevInput="",o.value=e.text.join("\n"),D(o))}"cut"==t.type&&(n.state.cutIncoming=+new Date)}}r.wrapper.insertBefore(this.wrapper,r.wrapper.firstChild),c&&(o.style.width="0px"),xt(o,"input",function(){T&&9<=k&&t.hasSelection&&(t.hasSelection=null),i.poll()}),xt(o,"paste",function(t){wt(n,t)||Us(t,n)||(n.state.pasteIncoming=+new Date,i.fastPoll())}),xt(o,"cut",e),xt(o,"copy",e),xt(r.scroller,"paste",function(t){if(!Ar(r,t)&&!wt(n,t)){if(!o.dispatchEvent)return n.state.pasteIncoming=+new Date,void i.focus();var e=new Event("paste");e.clipboardData=t.clipboardData,o.dispatchEvent(e)}}),xt(r.lineSpace,"selectstart",function(t){Ar(r,t)||At(t)}),xt(o,"compositionstart",function(){var t=n.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:n.markText(t,n.getCursor("to"),{className:"CodeMirror-composing"})}}),xt(o,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},Qs.prototype.createField=function(t){this.wrapper=Ws(),this.textarea=this.wrapper.firstChild},Qs.prototype.prepareSelection=function(){var t=this.cm,e=t.display,r=t.doc,i=Ti(t);if(t.options.moveInputWithCursor){var n=Jr(t,r.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),s=e.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,n.top+s.top-o.top)),i.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,n.left+s.left-o.left))}return i},Qs.prototype.showSelection=function(t){var e=this.cm.display;A(e.cursorDiv,t.cursors),A(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Qs.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var r=e.getSelection();this.textarea.value=r,e.state.focused&&D(this.textarea),T&&9<=k&&(this.hasSelection=r)}else t||(this.prevInput=this.textarea.value="",T&&9<=k&&(this.hasSelection=null))}},Qs.prototype.getField=function(){return this.textarea},Qs.prototype.supportsTouch=function(){return!1},Qs.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!f||I()!=this.textarea))try{this.textarea.focus()}catch(t){}},Qs.prototype.blur=function(){this.textarea.blur()},Qs.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Qs.prototype.receivedFocus=function(){this.slowPoll()},Qs.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},Qs.prototype.fastPoll=function(){var e=!1,r=this;r.pollingFast=!0,r.polling.set(20,function t(){r.poll()||e?(r.pollingFast=!1,r.slowPoll()):(e=!0,r.polling.set(60,t))})},Qs.prototype.poll=function(){var t=this,e=this.cm,r=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||zt(r)&&!i&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var n=r.value;if(n==i&&!e.somethingSelected())return!1;if(T&&9<=k&&this.hasSelection===n||x&&/[\uf700-\uf7ff]/.test(n))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=n.charCodeAt(0);if(8203!=o||i||(i=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var s=0,a=Math.min(i.length,n.length);s<a&&i.charCodeAt(s)==n.charCodeAt(s);)++s;return rn(e,function(){Bs(e,n.slice(s),i.length-s,null,t.composing?"*compose":null),1e3<n.length||-1<n.indexOf("\n")?r.value=t.prevInput="":t.prevInput=n,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Qs.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Qs.prototype.onKeyPress=function(){T&&9<=k&&(this.hasSelection=null),this.fastPoll()},Qs.prototype.onContextMenu=function(t){var r=this,i=r.cm,n=i.display,o=r.textarea;r.contextMenuPending&&r.contextMenuPending();var e=pi(i,t),s=n.scroller.scrollTop;if(e&&!g){i.options.resetSelectionOnContextMenu&&-1==i.doc.sel.contains(e)&&nn(i,io)(i.doc,Ln(e),q);var a,l=o.style.cssText,h=r.wrapper.style.cssText,c=r.wrapper.offsetParent.getBoundingClientRect();if(r.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-c.top-5)+"px; left: "+(t.clientX-c.left-5)+"px;\n z-index: 1000; background: "+(T?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",y&&(a=window.scrollY),n.input.focus(),y&&window.scrollTo(null,a),n.input.reset(),i.somethingSelected()||(o.value=r.prevInput=" "),r.contextMenuPending=p,n.selForContextMenu=i.doc.sel,clearTimeout(n.detectingSelectAll),T&&9<=k&&f(),b){Ot(t);var u=function(){kt(window,"mouseup",u),setTimeout(p,20)};xt(window,"mouseup",u)}else setTimeout(p,50)}function f(){if(null!=o.selectionStart){var t=i.somethingSelected(),e=""+(t?o.value:"");o.value="⇚",o.value=e,r.prevInput=t?"":"",o.selectionStart=1,o.selectionEnd=e.length,n.selForContextMenu=i.doc.sel}}function p(){if(r.contextMenuPending==p&&(r.contextMenuPending=!1,r.wrapper.style.cssText=h,o.style.cssText=l,T&&k<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=s),null!=o.selectionStart)){(!T||T&&k<9)&&f();var t=0,e=function(){n.selForContextMenu==i.doc.sel&&0==o.selectionStart&&0<o.selectionEnd&&""==r.prevInput?nn(i,uo)(i):t++<10?n.detectingSelectAll=setTimeout(e,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(e,200)}}},Qs.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},Qs.prototype.setUneditable=function(){},Qs.prototype.needsContentAttribute=!1,Zs=(Xs=Is).optionHandlers,Xs.defineOption=ra,Xs.Init=Ss,ra("value","",function(t,e){return t.setValue(e)},!0),ra("mode",null,function(t,e){t.doc.modeOption=e,Mn(t)},!0),ra("indentUnit",2,Mn,!0),ra("indentWithTabs",!1),ra("smartIndent",!0),ra("tabSize",4,function(t){Dn(t),Vr(t),mi(t)},!0),ra("lineSeparator",null,function(t,i){if(t.doc.lineSep=i){var n=[],o=t.doc.first;t.doc.iter(function(t){for(var e=0;;){var r=t.text.indexOf(i,e);if(-1==r)break;e=r+i.length,n.push(le(o,r))}o++});for(var e=n.length-1;0<=e;e--)yo(t.doc,i,n[e],le(n[e].line,n[e].ch+i.length))}}),ra("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(t,e,r){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),r!=Ss&&t.refresh()}),ra("specialCharPlaceholder",or,function(t){return t.refresh()},!0),ra("electricChars",!0),ra("inputStyle",f?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ra("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),ra("autocorrect",!1,function(t,e){return t.getInputField().autocorrect=e},!0),ra("autocapitalize",!1,function(t,e){return t.getInputField().autocapitalize=e},!0),ra("rtlMoveVisually",!d),ra("wholeLineUpdateBefore",!0),ra("theme","default",function(t){Cs(t),yn(t)},!0),ra("keyMap","default",function(t,e,r){var i=ts(e),n=r!=Ss&&ts(r);n&&n.detach&&n.detach(t,i),i.attach&&i.attach(t,n||null)}),ra("extraKeys",null),ra("configureMouse",null),ra("lineWrapping",!1,Os,!0),ra("gutters",[],function(t,e){t.display.gutterSpecs=_n(e,t.options.lineNumbers),yn(t)},!0),ra("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?ci(t.display)+"px":"0",t.refresh()},!0),ra("coverGutterNextToScrollbar",!1,function(t){return ji(t)},!0),ra("scrollbarStyle","native",function(t){Ki(t),ji(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),ra("lineNumbers",!1,function(t,e){t.display.gutterSpecs=_n(t.options.gutters,e),yn(t)},!0),ra("firstLineNumber",1,yn,!0),ra("lineNumberFormatter",function(t){return t},yn,!0),ra("showCursorWhenSelecting",!1,xi,!0),ra("resetSelectionOnContextMenu",!0),ra("lineWiseCopyCut",!0),ra("pasteLinesPerSelection",!0),ra("selectionsMayTouch",!1),ra("readOnly",!1,function(t,e){"nocursor"==e&&(Li(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),ra("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),ra("dragDrop",!0,Ns),ra("allowDropFileTypes",null),ra("cursorBlinkRate",530),ra("cursorScrollMargin",0),ra("cursorHeight",1,xi,!0),ra("singleCursorHeightPerLine",!0,xi,!0),ra("workTime",100),ra("workDelay",100),ra("flattenSpans",!0,Dn,!0),ra("addModeClass",!1,Dn,!0),ra("pollInterval",100),ra("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),ra("historyEventDelay",1250),ra("viewportMargin",10,function(t){return t.refresh()},!0),ra("maxHighlightLength",1e4,Dn,!0),ra("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),ra("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),ra("autofocus",null),ra("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0),ra("phrases",null),ta=(Js=Is).optionHandlers,ea=Js.helpers={},Js.prototype={constructor:Js,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,e){var r=this.options,i=r[t];r[t]==e&&"mode"!=t||(r[t]=e,ta.hasOwnProperty(t)&&nn(this,ta[t])(this,e,i),bt(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](ts(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,r=0;r<e.length;++r)if(e[r]==t||e[r].name==t)return e.splice(r,1),!0},addOverlay:on(function(t,e){var r=t.token?t:Js.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");!function(t,e,r){for(var i=0,n=r(e);i<t.length&&r(t[i])<=n;)i++;t.splice(i,0,e)}(this.state.overlays,{mode:r,modeSpec:t,opaque:e&&e.opaque,priority:e&&e.priority||0},function(t){return t.priority}),this.state.modeGen++,mi(this)}),removeOverlay:on(function(t){for(var e=this.state.overlays,r=0;r<e.length;++r){var i=e[r].modeSpec;if(i==t||"string"==typeof t&&i.name==t)return e.splice(r,1),this.state.modeGen++,void mi(this)}}),indentLine:on(function(t,e,r){"string"!=typeof e&&"number"!=typeof e&&(e=null==e?this.options.smartIndent?"smart":"prev":e?"add":"subtract"),se(this.doc,t)&&Ms(this,t,e,r)}),indentSelection:on(function(t){for(var e=this.doc.sel.ranges,r=-1,i=0;i<e.length;i++){var n=e[i];if(n.empty())n.head.line>r&&(Ms(this,n.head.line,t,!0),r=n.head.line,i==this.doc.sel.primIndex&&Di(this));else{var o=n.from(),s=n.to(),a=Math.max(r,o.line);r=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;l<r;++l)Ms(this,l,t);var h=this.doc.sel.ranges;0==o.ch&&e.length==h.length&&0<h[i].from().ch&&to(this.doc,i,new Sn(o,h[i].to()),q)}}}),getTokenAt:function(t,e){return Ce(this,t,e)},getLineTokens:function(t,e){return Ce(this,le(t),e,!0)},getTokenTypeAt:function(t){t=me(this.doc,t);var e,r=xe(this,te(this.doc,t.line)),i=0,n=(r.length-1)/2,o=t.ch;if(0==o)e=r[2];else for(;;){var s=i+n>>1;if((s?r[2*s-1]:0)>=o)n=s;else{if(!(r[2*s+1]<o)){e=r[2*s+2];break}i=1+s}}var a=e?e.indexOf("overlay "):-1;return a<0?e:0==a?null:e.slice(0,a-1)},getModeAt:function(t){var e=this.doc.mode;return e.innerMode?Js.innerMode(e,this.getTokenAt(t).state).mode:e},getHelper:function(t,e){return this.getHelpers(t,e)[0]},getHelpers:function(t,e){var r=[];if(!ea.hasOwnProperty(e))return r;var i=ea[e],n=this.getModeAt(t);if("string"==typeof n[e])i[n[e]]&&r.push(i[n[e]]);else if(n[e])for(var o=0;o<n[e].length;o++){var s=i[n[e][o]];s&&r.push(s)}else n.helperType&&i[n.helperType]?r.push(i[n.helperType]):i[n.name]&&r.push(i[n.name]);for(var a=0;a<i._global.length;a++){var l=i._global[a];l.pred(n,this)&&-1==H(r,l.val)&&r.push(l.val)}return r},getStateAfter:function(t,e){var r=this.doc;return Te(this,(t=de(r,null==t?r.first+r.size-1:t))+1,e).state},cursorCoords:function(t,e){var r=this.doc.sel.primary();return Jr(this,null==t?r.head:"object"==typeof t?me(this.doc,t):t?r.from():r.to(),e||"page")},charCoords:function(t,e){return Zr(this,me(this.doc,t),e||"page")},coordsChar:function(t,e){return ri(this,(t=Xr(this,t,e||"page")).left,t.top)},lineAtHeight:function(t,e){return t=Xr(this,{top:t,left:0},e||"page").top,oe(this.doc,t+this.display.viewOffset)},heightAtLine:function(t,e,r){var i,n=!1;if("number"==typeof t){var o=this.doc.first+this.doc.size-1;t<this.doc.first?t=this.doc.first:o<t&&(t=o,n=!0),i=te(this.doc,t)}else i=t;return Qr(this,i,{top:0,left:0},e||"page",r||n).top+(n?this.doc.height-Xe(i):0)},defaultTextHeight:function(){return ai(this.display)},defaultCharWidth:function(){return li(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,r,i,n){var o,s,a,l=this.display,h=(t=Jr(this,me(this.doc,t))).bottom,c=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),l.sizer.appendChild(e),"over"==i)h=t.top;else if("above"==i||"near"==i){var u=Math.max(l.wrapper.clientHeight,this.doc.height),f=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==i||t.bottom+e.offsetHeight>u)&&t.top>e.offsetHeight?h=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=u&&(h=t.bottom),c+e.offsetWidth>f&&(c=f-e.offsetWidth)}e.style.top=h+"px",e.style.left=e.style.right="","right"==n?(c=l.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==n?c=0:"middle"==n&&(c=(l.sizer.clientWidth-e.offsetWidth)/2),e.style.left=c+"px"),r&&(o=this,s={left:c,top:h,right:c+e.offsetWidth,bottom:h+e.offsetHeight},null!=(a=Ri(o,s)).scrollTop&&Fi(o,a.scrollTop),null!=a.scrollLeft&&zi(o,a.scrollLeft))},triggerOnKeyDown:on(ms),triggerOnKeyPress:on(_s),triggerOnKeyUp:gs,triggerOnMouseDown:on(Ts),execCommand:function(t){if(ss.hasOwnProperty(t))return ss[t].call(null,this)},triggerElectric:on(function(t){Fs(this,t)}),findPosH:function(t,e,r,i){var n=1;e<0&&(n=-1,e=-e);for(var o=me(this.doc,t),s=0;s<e&&!(o=qs(this.doc,o,n,r,i)).hitSide;++s);return o},moveH:on(function(e,r){var i=this;this.extendSelectionsBy(function(t){return i.display.shift||i.doc.extend||t.empty()?qs(i.doc,t.head,e,r,i.options.rtlMoveVisually):e<0?t.from():t.to()},j)}),deleteH:on(function(r,i){var t=this.doc.sel,n=this.doc;t.somethingSelected()?n.replaceSelection("",null,"+delete"):es(this,function(t){var e=qs(n,t.head,r,i,!1);return r<0?{from:e,to:t.head}:{from:t.head,to:e}})}),findPosV:function(t,e,r,i){var n=1,o=i;e<0&&(n=-1,e=-e);for(var s=me(this.doc,t),a=0;a<e;++a){var l=Jr(this,s,"div");if(null==o?o=l.left:l.left=o,(s=Gs(this,l,n,r)).hitSide)break}return s},moveV:on(function(i,n){var o=this,s=this.doc,a=[],l=!this.display.shift&&!s.extend&&s.sel.somethingSelected();if(s.extendSelectionsBy(function(t){if(l)return i<0?t.from():t.to();var e=Jr(o,t.head,"div");null!=t.goalColumn&&(e.left=t.goalColumn),a.push(e.left);var r=Gs(o,e,i,n);return"page"==n&&t==s.sel.primary()&&Mi(o,Zr(o,r,"div").top-e.top),r},j),a.length)for(var t=0;t<s.sel.ranges.length;t++)s.sel.ranges[t].goalColumn=a[t]}),findWordAt:function(t){var e=te(this.doc,t.line).text,r=t.ch,i=t.ch;if(e){var n=this.getHelper(t,"wordChars");"before"!=t.sticky&&i!=e.length||!r?++i:--r;for(var o=e.charAt(r),s=et(o,n)?function(t){return et(t,n)}:/\s/.test(o)?function(t){return/\s/.test(t)}:function(t){return!/\s/.test(t)&&!et(t)};0<r&&s(e.charAt(r-1));)--r;for(;i<e.length&&s(e.charAt(i));)++i}return new Sn(le(t.line,r),le(t.line,i))},toggleOverwrite:function(t){null!=t&&t==this.state.overwrite||(((this.state.overwrite=!this.state.overwrite)?R:C)(this.display.cursorDiv,"CodeMirror-overwrite"),bt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==I()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:on(function(t,e){Pi(this,t,e)}),getScrollInfo:function(){var t=this.display.scroller;return{left:t.scrollLeft,top:t.scrollTop,height:t.scrollHeight-Ir(this)-this.display.barHeight,width:t.scrollWidth-Ir(this)-this.display.barWidth,clientHeight:Mr(this),clientWidth:Rr(this)}},scrollIntoView:on(function(t,e){var r,i;null==t?(t={from:this.doc.sel.primary().head,to:null},null==e&&(e=this.options.cursorScrollMargin)):"number"==typeof t?t={from:le(t,0),to:null}:null==t.from&&(t={from:t,to:null}),t.to||(t.to=t.from),t.margin=e||0,null!=t.from.line?(i=t,Bi(r=this),r.curOp.scrollToPos=i):Ui(this,t.from,t.to,t.margin)}),setSize:on(function(t,e){function r(t){return"number"==typeof t||/^\d+$/.test(String(t))?t+"px":t}var i=this;null!=t&&(this.display.wrapper.style.width=r(t)),null!=e&&(this.display.wrapper.style.height=r(e)),this.options.lineWrapping&&jr(this);var n=this.display.viewFrom;this.doc.iter(n,this.display.viewTo,function(t){if(t.widgets)for(var e=0;e<t.widgets.length;e++)if(t.widgets[e].noHScroll){gi(i,n,"widget");break}++n}),this.curOp.forceUpdate=!0,bt(this,"refresh",this)}),operation:function(t){return rn(this,t)},startOperation:function(){return Qi(this)},endOperation:function(){return Xi(this)},refresh:on(function(){var t=this.display.cachedTextHeight;mi(this),this.curOp.forceUpdate=!0,Vr(this),Pi(this,this.doc.scrollLeft,this.doc.scrollTop),pn(this.display),(null==t||.5<Math.abs(t-ai(this.display)))&&fi(this),bt(this,"refresh",this)}),swapDoc:on(function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),Fn(this,t),Vr(this),this.display.input.reset(),Pi(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,mr(this,"swapDoc",this,e),e}),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},St(Js),Js.registerHelper=function(t,e,r){ea.hasOwnProperty(t)||(ea[t]=Js[t]={_global:[]}),ea[t][e]=r},Js.registerGlobalHelper=function(t,e,r,i){Js.registerHelper(t,e,i),ea[t]._global.push({pred:r,val:i})};var ia,na="iter insert remove copy getEditor constructor".split(" ");for(var oa in Do.prototype)Do.prototype.hasOwnProperty(oa)&&H(na,oa)<0&&(Is.prototype[oa]=function(t){return function(){return t.apply(this.doc,arguments)}}(Do.prototype[oa]));return St(Do),Is.inputStyles={textarea:Qs,contenteditable:js},Is.defineMode=function(t){Is.defaults.mode||"null"==t||(Is.defaults.mode=t),function(t,e){2<arguments.length&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Gt[t]=e}.apply(this,arguments)},Is.defineMIME=function(t,e){jt[t]=e},Is.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Is.defineMIME("text/plain","null"),Is.defineExtension=function(t,e){Is.prototype[t]=e},Is.defineDocExtension=function(t,e){Do.prototype[t]=e},Is.fromTextArea=function(e,r){if((r=r?B(r):{}).value=e.value,!r.tabindex&&e.tabIndex&&(r.tabindex=e.tabIndex),!r.placeholder&&e.placeholder&&(r.placeholder=e.placeholder),null==r.autofocus){var t=I();r.autofocus=t==e||null!=e.getAttribute("autofocus")&&t==document.body}function i(){e.value=a.getValue()}var n;if(e.form&&(xt(e.form,"submit",i),!r.leaveSubmitMethodAlone)){var o=e.form;n=o.submit;try{var s=o.submit=function(){i(),o.submit=n,o.submit(),o.submit=s}}catch(t){}}r.finishInit=function(t){t.save=i,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,i(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(kt(e.form,"submit",i),r.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=n))}},e.style.display="none";var a=Is(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},r);return a},(ia=Is).off=kt,ia.on=xt,ia.wheelEventPixels=wn,ia.Doc=Do,ia.splitLines=Ht,ia.countColumn=U,ia.findColumn=V,ia.isWordChar=tt,ia.Pass=W,ia.signal=bt,ia.Line=tr,ia.changeEnd=Nn,ia.scrollbarModel=Yi,ia.Pos=le,ia.cmpPos=he,ia.modes=Gt,ia.mimeModes=jt,ia.resolveMode=Vt,ia.getMode=Yt,ia.modeExtensions=Kt,ia.extendMode=$t,ia.copyState=Qt,ia.startState=Zt,ia.innerMode=Xt,ia.commands=ss,ia.keyMap=Yo,ia.keyName=Jo,ia.isModifierKey=Xo,ia.lookupKey=Qo,ia.normalizeKeyMap=$o,ia.StringStream=Jt,ia.SharedTextMarker=Oo,ia.TextMarker=Lo,ia.LineWidget=Co,ia.e_preventDefault=At,ia.e_stopPropagation=Lt,ia.e_stop=Ot,ia.addClass=R,ia.contains=O,ia.rmClass=C,ia.keyNames=qo,Is.version="5.50.2",Is},"object"==typeof r&&void 0!==e?e.exports=n():"function"==typeof define&&define.amd?define(n):(i=i||self).CodeMirror=n()},{}],15:[function(t,e,r){var i;i=function(N){"use strict";function O(t,e,r,i,n,o){this.indented=t,this.column=e,this.type=r,this.info=i,this.align=n,this.prev=o}function I(t,e,r,i){var n=t.indented;return t.context&&"statement"==t.context.type&&"statement"!=r&&(n=t.context.indented),t.context=new O(n,e,r,i,null,t.context)}function R(t){var e=t.context.type;return")"!=e&&"]"!=e&&"}"!=e||(t.indented=t.context.indented),t.context=t.context.prev}function M(t,e,r){return"variable"==e.prevToken||"type"==e.prevToken||(!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(t.string.slice(0,r))||(!(!e.typeAtEndOfLine||t.column()!=t.indentation())||void 0))}function D(t){for(;;){if(!t||"top"==t.type)return 1;if("}"==t.type&&"namespace"!=t.prev.info)return;t=t.prev}}function t(t){for(var e={},r=t.split(" "),i=0;i<r.length;++i)e[r[i]]=!0;return e}function P(t,e){return"function"==typeof t?t(e):t.propertyIsEnumerable(e)}N.defineMode("clike",function(t,a){var s,l,h=t.indentUnit,c=a.statementIndentUnit||h,u=a.dontAlignCalls,f=a.keywords||{},p=a.types||{},d=a.builtin||{},m=a.blockKeywords||{},g=a.defKeywords||{},_=a.atoms||{},v=a.hooks||{},y=a.multiLineStrings,o=!1!==a.indentStatements,e=!1!==a.indentSwitch,x=a.namespaceSeparator,T=a.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,k=a.numberStart||/[\d\.]/,b=a.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,w=a.isOperatorChar||/[+\-*&%=<>!?|\/]/,E=a.isIdentifierChar||/[\w\$_\xa1-\uffff]/,C=a.isReservedIdentifier||!1;function S(t,e){var o,r=t.next();if(v[r]){var i=v[r](t,e);if(!1!==i)return i}if('"'==r||"'"==r)return e.tokenize=(o=r,function(t,e){for(var r,i=!1,n=!1;null!=(r=t.next());){if(r==o&&!i){n=!0;break}i=!i&&"\\"==r}return!n&&(i||y)||(e.tokenize=null),"string"}),e.tokenize(t,e);if(T.test(r))return s=r,null;if(k.test(r)){if(t.backUp(1),t.match(b))return"number";t.next()}if("/"==r){if(t.eat("*"))return(e.tokenize=A)(t,e);if(t.eat("/"))return t.skipToEnd(),"comment"}if(w.test(r)){for(;!t.match(/^\/[\/*]/,!1)&&t.eat(w););return"operator"}if(t.eatWhile(E),x)for(;t.match(x);)t.eatWhile(E);var n=t.current();return P(f,n)?(P(m,n)&&(s="newstatement"),P(g,n)&&(l=!0),"keyword"):P(p,n)?"type":P(d,n)||C&&C(n)?(P(m,n)&&(s="newstatement"),"builtin"):P(_,n)?"atom":"variable"}function A(t,e){for(var r,i=!1;r=t.next();){if("/"==r&&i){e.tokenize=null;break}i="*"==r}return"comment"}function L(t,e){a.typeFirstDefinitions&&t.eol()&&D(e.context)&&(e.typeAtEndOfLine=M(t,e,t.pos))}return{startState:function(t){return{tokenize:null,context:new O((t||0)-h,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(t,e){var r=e.context;if(t.sol()&&(null==r.align&&(r.align=!1),e.indented=t.indentation(),e.startOfLine=!0),t.eatSpace())return L(t,e),null;s=l=null;var i=(e.tokenize||S)(t,e);if("comment"==i||"meta"==i)return i;if(null==r.align&&(r.align=!0),";"==s||":"==s||","==s&&t.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==e.context.type;)R(e);else if("{"==s)I(e,t.column(),"}");else if("["==s)I(e,t.column(),"]");else if("("==s)I(e,t.column(),")");else if("}"==s){for(;"statement"==r.type;)r=R(e);for("}"==r.type&&(r=R(e));"statement"==r.type;)r=R(e)}else s==r.type?R(e):o&&(("}"==r.type||"top"==r.type)&&";"!=s||"statement"==r.type&&"newstatement"==s)&&I(e,t.column(),"statement",t.current());if("variable"==i&&("def"==e.prevToken||a.typeFirstDefinitions&&M(t,e,t.start)&&D(e.context)&&t.match(/^\s*\(/,!1))&&(i="def"),v.token){var n=v.token(t,e,i);void 0!==n&&(i=n)}return"def"==i&&!1===a.styleDefs&&(i="variable"),e.startOfLine=!1,e.prevToken=l?"def":i||s,L(t,e),i},indent:function(t,e){if(t.tokenize!=S&&null!=t.tokenize||t.typeAtEndOfLine)return N.Pass;var r=t.context,i=e&&e.charAt(0),n=i==r.type;if("statement"==r.type&&"}"==i&&(r=r.prev),a.dontIndentStatements)for(;"statement"==r.type&&a.dontIndentStatements.test(r.info);)r=r.prev;if(v.indent){var o=v.indent(t,r,e,h);if("number"==typeof o)return o}var s=r.prev&&"switch"==r.prev.info;if(a.allmanIndentation&&/[{(]/.test(i)){for(;"top"!=r.type&&"}"!=r.type;)r=r.prev;return r.indented}return"statement"==r.type?r.indented+("{"==i?0:c):!r.align||u&&")"==r.type?")"!=r.type||n?r.indented+(n?0:h)+(n||!s||/^(?:case|default)\b/.test(e)?0:h):r.indented+c:r.column+(n?0:1)},electricInput:e?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});var e="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran",r="alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try typeid typename using virtual xor xor_eq",i="bycopy byref in inout oneway out self super atomic nonatomic retain copy readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd @interface @implementation @end @protocol @encode @property @synthesize @dynamic @class @public @package @private @protected @required @optional @try @catch @finally @import @selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available",n="FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT",o=t("int long char short double float unsigned signed void bool"),s=t("SEL instancetype id Class Protocol BOOL");function a(t){return P(o,t)||/.+_t$/.test(t)}function l(t){return a(t)||P(s,t)}var h="case do else for if switch while struct enum union",c="struct enum union";function u(t,e){if(!e.startOfLine)return!1;for(var r,i=null;r=t.peek();){if("\\"==r&&t.match(/^.$/)){i=u;break}if("/"==r&&t.match(/^\/[\/\*]/,!1))break;t.next()}return e.tokenize=i,"meta"}function f(t,e){return"type"==e.prevToken&&"type"}function p(t){return!(!t||t.length<2)&&("_"==t[0]&&("_"==t[1]||t[1]!==t[1].toLowerCase()))}function d(t){return t.eatWhile(/[\w\.']/),"number"}function m(t,e){if(t.backUp(1),t.match(/(R|u8R|uR|UR|LR)/)){var r=t.match(/"([^\s\\()]{0,16})\(/);return r?(e.cpp11RawStringDelim=r[1],(e.tokenize=v)(t,e)):!1}return t.match(/(u8|u|U|L)/)?!!t.match(/["']/,!1)&&"string":(t.next(),!1)}function g(t){var e=/(\w+)::~?(\w+)$/.exec(t);return e&&e[1]==e[2]}function _(t,e){for(var r;null!=(r=t.next());)if('"'==r&&!t.eat('"')){e.tokenize=null;break}return"string"}function v(t,e){var r=e.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");return t.match(new RegExp(".*?\\)"+r+'"'))?e.tokenize=null:t.skipToEnd(),"string"}function y(t,e){"string"==typeof t&&(t=[t]);var r=[];function i(t){if(t)for(var e in t)t.hasOwnProperty(e)&&r.push(e)}i(e.keywords),i(e.types),i(e.builtin),i(e.atoms),r.length&&(e.helperType=t[0],N.registerHelper("hintWords",t[0],r));for(var n=0;n<t.length;++n)N.defineMIME(t[n],e)}function x(t,e){for(var r=!1;!t.eol();){if(!r&&t.match('"""')){e.tokenize=null;break}r="\\"==t.next()&&!r}return"string"}function T(i){return function(t,e){for(var r;r=t.next();){if("*"==r&&t.eat("/")){if(1!=i)return e.tokenize=T(i-1),e.tokenize(t,e);e.tokenize=null;break}if("/"==r&&t.eat("*"))return e.tokenize=T(i+1),e.tokenize(t,e)}return"comment"}}y(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:t(e),types:a,blockKeywords:t(h),defKeywords:t(c),typeFirstDefinitions:!0,atoms:t("NULL true false"),isReservedIdentifier:p,hooks:{"#":u,"*":f},modeProps:{fold:["brace","include"]}}),y(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:t(e+" "+r),types:a,blockKeywords:t(h+" class try catch"),defKeywords:t(c+" class namespace"),typeFirstDefinitions:!0,atoms:t("true false NULL nullptr"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,isReservedIdentifier:p,hooks:{"#":u,"*":f,u:m,U:m,L:m,R:m,0:d,1:d,2:d,3:d,4:d,5:d,6:d,7:d,8:d,9:d,token:function(t,e,r){if("variable"==r&&"("==t.peek()&&(";"==e.prevToken||null==e.prevToken||"}"==e.prevToken)&&g(t.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),y("text/x-java",{name:"clike",keywords:t("abstract assert break case catch class const continue default do else enum extends final finally for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface"),types:t("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:t("catch class do else finally for if switch try while"),defKeywords:t("class interface enum @interface"),typeFirstDefinitions:!0,atoms:t("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(t){return!t.match("interface",!1)&&(t.eatWhile(/[\w\$_]/),"meta")}},modeProps:{fold:["brace","import"]}}),y("text/x-csharp",{name:"clike",keywords:t("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),types:t("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),blockKeywords:t("catch class do else finally for foreach if struct switch try while"),defKeywords:t("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:t("true false null"),hooks:{"@":function(t,e){return t.eat('"')?(e.tokenize=_)(t,e):(t.eatWhile(/[\w\$_]/),"meta")}}}),y("text/x-scala",{name:"clike",keywords:t("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble"),types:t("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,blockKeywords:t("catch class enum do else finally for forSome if match switch try while"),defKeywords:t("class enum def object package trait type val var"),atoms:t("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(t){return t.eatWhile(/[\w\$_]/),"meta"},'"':function(t,e){return!!t.match('""')&&(e.tokenize=x,e.tokenize(t,e))},"'":function(t){return t.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(t,e){var r=e.context;return!("}"!=r.type||!r.align||!t.eat(">"))&&(e.context=new O(r.indented,r.column,r.type,r.info,null,r.prev),"operator")},"/":function(t,e){return!!t.eat("*")&&(e.tokenize=T(1),e.tokenize(t,e))}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}}),y("text/x-kotlin",{name:"clike",keywords:t("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam"),types:t("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:t("catch class do else finally for if where try while enum"),defKeywords:t("class val var object interface fun"),atoms:t("true false null this"),hooks:{"@":function(t){return t.eatWhile(/[\w\$_]/),"meta"},"*":function(t,e){return"."==e.prevToken?"variable":"operator"},'"':function(t,e){var o;return e.tokenize=(o=t.match('""'),function(t,e){for(var r,i=!1,n=!1;!t.eol();){if(!o&&!i&&t.match('"')){n=!0;break}if(o&&t.match('"""')){n=!0;break}r=t.next(),!i&&"$"==r&&t.match("{")&&t.skipTo("}"),i=!i&&"\\"==r&&!o}return!n&&o||(e.tokenize=null),"string"}),e.tokenize(t,e)},"/":function(t,e){return!!t.eat("*")&&(e.tokenize=T(1),e.tokenize(t,e))},indent:function(t,e,r,i){var n=r&&r.charAt(0);return"}"!=t.prevToken&&")"!=t.prevToken||""!=r?"operator"==t.prevToken&&"}"!=r&&"}"!=t.context.type||"variable"==t.prevToken&&"."==n||("}"==t.prevToken||")"==t.prevToken)&&"."==n?2*i+e.indented:e.align&&"}"==e.type?e.indented+(t.context.type==(r||"").charAt(0)?0:i):void 0:t.indented}},modeProps:{closeBrackets:{triples:'"'}}}),y(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:t("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:t("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:t("for while do if else struct"),builtin:t("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:t("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":u},modeProps:{fold:["brace","include"]}}),y("text/x-nesc",{name:"clike",keywords:t(e+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:a,blockKeywords:t(h),atoms:t("null true false"),hooks:{"#":u},modeProps:{fold:["brace","include"]}}),y("text/x-objectivec",{name:"clike",keywords:t(e+" "+i),types:l,builtin:t(n),blockKeywords:t(h+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:t(c+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:t("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:p,hooks:{"#":u,"*":f},modeProps:{fold:["brace","include"]}}),y("text/x-objectivec++",{name:"clike",keywords:t(e+" "+i+" "+r),types:l,builtin:t(n),blockKeywords:t(h+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:t(c+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:t("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:p,hooks:{"#":u,"*":f,u:m,U:m,L:m,R:m,0:d,1:d,2:d,3:d,4:d,5:d,6:d,7:d,8:d,9:d,token:function(t,e,r){if("variable"==r&&"("==t.peek()&&(";"==e.prevToken||null==e.prevToken||"}"==e.prevToken)&&g(t.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),y("text/x-squirrel",{name:"clike",keywords:t("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:a,blockKeywords:t("case catch class else for foreach if switch try while"),defKeywords:t("function local class"),typeFirstDefinitions:!0,atoms:t("true false null"),hooks:{"#":u},modeProps:{fold:["brace","include"]}});var k=null;y("text/x-ceylon",{name:"clike",keywords:t("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(t){var e=t.charAt(0);return e===e.toUpperCase()&&e!==e.toLowerCase()},blockKeywords:t("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:t("class dynamic function interface module object package value"),builtin:t("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:t("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(t){return t.eatWhile(/[\w\$_]/),"meta"},'"':function(t,e){return e.tokenize=function o(s){return function(t,e){for(var r,i=!1,n=!1;!t.eol();){if(!i&&t.match('"')&&("single"==s||t.match('""'))){n=!0;break}if(!i&&t.match("``")){k=o(s),n=!0;break}r=t.next(),i="single"==s&&!i&&"\\"==r}return n&&(e.tokenize=null),"string"}}(t.match('""')?"triple":"single"),e.tokenize(t,e)},"`":function(t,e){return!(!k||!t.match("`"))&&(e.tokenize=k,k=null,e.tokenize(t,e))},"'":function(t){return t.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(t,e,r){if(("variable"==r||"type"==r)&&"."==e.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})},"object"==typeof r&&"object"==typeof e?i(t("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)},{"../../lib/codemirror":14}],16:[function(t,e,r){var i;i=function(N){"use strict";function t(t){for(var e={},r=0;r<t.length;++r)e[t[r].toLowerCase()]=!0;return e}N.defineMode("css",function(t,e){var r=e.inline;e.propertyKeywords||(e=N.resolveMode("text/css"));var i,n,o=t.indentUnit,s=e.tokenHooks,a=e.documentTypes||{},l=e.mediaTypes||{},h=e.mediaFeatures||{},c=e.mediaValueKeywords||{},u=e.propertyKeywords||{},f=e.nonStandardPropertyKeywords||{},p=e.fontProperties||{},d=e.counterDescriptors||{},m=e.colorKeywords||{},g=e.valueKeywords||{},_=e.allowNested,v=e.lineComment,y=!0===e.supportsAtComponent;function x(t,e){return i=e,t}function T(n){return function(t,e){for(var r,i=!1;null!=(r=t.next());){if(r==n&&!i){")"==n&&t.backUp(1);break}i=!i&&"\\"==r}return r!=n&&(i||")"==n)||(e.tokenize=null),x("string","string")}}function k(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=T(")"),x(null,"(")}function b(t,e,r){this.type=t,this.indent=e,this.prev=r}function w(t,e,r,i){return t.context=new b(r,e.indentation()+(!1===i?0:o),t.context),r}function E(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function C(t,e,r){return L[r.context.type](t,e,r)}function S(t,e,r,i){for(var n=i||1;0<n;n--)r.context=r.context.prev;return C(t,e,r)}function A(t){var e=t.current().toLowerCase();n=g.hasOwnProperty(e)?"atom":m.hasOwnProperty(e)?"keyword":"variable"}var L={top:function(t,e,r){if("{"==t)return w(r,e,"block");if("}"==t&&r.context.prev)return E(r);if(y&&/@component/i.test(t))return w(r,e,"atComponentBlock");if(/^@(-moz-)?document$/i.test(t))return w(r,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(t))return w(r,e,"atBlock");if(/^@(font-face|counter-style)/i.test(t))return r.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return w(r,e,"at");if("hash"==t)n="builtin";else if("word"==t)n="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return w(r,e,"interpolation");if(":"==t)return"pseudo";if(_&&"("==t)return w(r,e,"parens")}return r.context.type},block:function(t,e,r){if("word"!=t)return"meta"==t?"block":_||"hash"!=t&&"qualifier"!=t?L.top(t,e,r):(n="error","block");var i=e.current().toLowerCase();return u.hasOwnProperty(i)?(n="property","maybeprop"):f.hasOwnProperty(i)?(n="string-2","maybeprop"):_?(n=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(n+=" error","maybeprop")},maybeprop:function(t,e,r){return":"==t?w(r,e,"prop"):C(t,e,r)},prop:function(t,e,r){if(";"==t)return E(r);if("{"==t&&_)return w(r,e,"propBlock");if("}"==t||"{"==t)return S(t,e,r);if("("==t)return w(r,e,"parens");if("hash"!=t||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(e.current())){if("word"==t)A(e);else if("interpolation"==t)return w(r,e,"interpolation")}else n+=" error";return"prop"},propBlock:function(t,e,r){return"}"==t?E(r):"word"==t?(n="property","maybeprop"):r.context.type},parens:function(t,e,r){return"{"==t||"}"==t?S(t,e,r):")"==t?E(r):"("==t?w(r,e,"parens"):"interpolation"==t?w(r,e,"interpolation"):("word"==t&&A(e),"parens")},pseudo:function(t,e,r){return"meta"==t?"pseudo":"word"==t?(n="variable-3",r.context.type):C(t,e,r)},documentTypes:function(t,e,r){return"word"==t&&a.hasOwnProperty(e.current())?(n="tag",r.context.type):L.atBlock(t,e,r)},atBlock:function(t,e,r){if("("==t)return w(r,e,"atBlock_parens");if("}"==t||";"==t)return S(t,e,r);if("{"==t)return E(r)&&w(r,e,_?"block":"top");if("interpolation"==t)return w(r,e,"interpolation");if("word"==t){var i=e.current().toLowerCase();n="only"==i||"not"==i||"and"==i||"or"==i?"keyword":l.hasOwnProperty(i)?"attribute":h.hasOwnProperty(i)?"property":c.hasOwnProperty(i)?"keyword":u.hasOwnProperty(i)?"property":f.hasOwnProperty(i)?"string-2":g.hasOwnProperty(i)?"atom":m.hasOwnProperty(i)?"keyword":"error"}return r.context.type},atComponentBlock:function(t,e,r){return"}"==t?S(t,e,r):"{"==t?E(r)&&w(r,e,_?"block":"top",!1):("word"==t&&(n="error"),r.context.type)},atBlock_parens:function(t,e,r){return")"==t?E(r):"{"==t||"}"==t?S(t,e,r,2):L.atBlock(t,e,r)},restricted_atBlock_before:function(t,e,r){return"{"==t?w(r,e,"restricted_atBlock"):"word"==t&&"@counter-style"==r.stateArg?(n="variable","restricted_atBlock_before"):C(t,e,r)},restricted_atBlock:function(t,e,r){return"}"==t?(r.stateArg=null,E(r)):"word"==t?(n="@font-face"==r.stateArg&&!p.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==r.stateArg&&!d.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(t,e,r){return"word"==t?(n="variable","keyframes"):"{"==t?w(r,e,"top"):C(t,e,r)},at:function(t,e,r){return";"==t?E(r):"{"==t||"}"==t?S(t,e,r):("word"==t?n="tag":"hash"==t&&(n="builtin"),"at")},interpolation:function(t,e,r){return"}"==t?E(r):"{"==t||";"==t?S(t,e,r):("word"==t?n="variable":"variable"!=t&&"("!=t&&")"!=t&&(n="error"),"interpolation")}};return{startState:function(t){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new b(r?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var r=(e.tokenize||function(t,e){var r=t.next();if(s[r]){var i=s[r](t,e);if(!1!==i)return i}return"@"==r?(t.eatWhile(/[\w\\\-]/),x("def",t.current())):"="==r||("~"==r||"|"==r)&&t.eat("=")?x(null,"compare"):'"'==r||"'"==r?(e.tokenize=T(r),e.tokenize(t,e)):"#"==r?(t.eatWhile(/[\w\\\-]/),x("atom","hash")):"!"==r?(t.match(/^\s*\w*/),x("keyword","important")):/\d/.test(r)||"."==r&&t.eat(/\d/)?(t.eatWhile(/[\w.%]/),x("number","unit")):"-"!==r?/[,+>*\/]/.test(r)?x(null,"select-op"):"."==r&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?x("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?x(null,r):t.match(/[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/.test(t.current().toLowerCase())&&(e.tokenize=k),x("variable callee","variable")):/[\w\\\-]/.test(r)?(t.eatWhile(/[\w\\\-]/),x("property","word")):x(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),x("number","unit")):t.match(/^-[\w\\\-]*/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?x("variable-2","variable-definition"):x("variable-2","variable")):t.match(/^\w+-/)?x("meta","meta"):void 0})(t,e);return r&&"object"==typeof r&&(i=r[1],r=r[0]),n=r,"comment"!=i&&(e.state=L[e.state](i,t,e)),n},indent:function(t,e){var r=t.context,i=e&&e.charAt(0),n=r.indent;return"prop"!=r.type||"}"!=i&&")"!=i||(r=r.prev),r.prev&&("}"!=i||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=i||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=i||"at"!=r.type&&"atBlock"!=r.type)||(n=Math.max(0,r.indent-o)):n=(r=r.prev).indent),n},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:v,fold:"brace"}});var e=["domain","regexp","url","url-prefix"],r=t(e),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],n=t(i),o=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],s=t(o),a=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],l=t(a),h=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],c=t(h),u=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],f=t(u),p=t(["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),d=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),m=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],g=t(m),_=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],v=t(_),y=e.concat(i).concat(o).concat(a).concat(h).concat(u).concat(m).concat(_);function x(t,e){for(var r,i=!1;null!=(r=t.next());){if(i&&"/"==r){e.tokenize=null;break}i="*"==r}return["comment","comment"]}N.registerHelper("hintWords","css",y),N.defineMIME("text/css",{documentTypes:r,mediaTypes:n,mediaFeatures:s,mediaValueKeywords:l,propertyKeywords:c,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:d,colorKeywords:g,valueKeywords:v,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=x)(t,e)}},name:"css"}),N.defineMIME("text/x-scss",{mediaTypes:n,mediaFeatures:s,mediaValueKeywords:l,propertyKeywords:c,nonStandardPropertyKeywords:f,colorKeywords:g,valueKeywords:v,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=x)(t,e):["operator","operator"]},":":function(t){return!!t.match(/\s*\{/,!1)&&[null,null]},$:function(t){return t.match(/^[\w-]+/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(t){return!!t.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),N.defineMIME("text/x-less",{mediaTypes:n,mediaFeatures:s,mediaValueKeywords:l,propertyKeywords:c,nonStandardPropertyKeywords:f,colorKeywords:g,valueKeywords:v,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=x)(t,e):["operator","operator"]},"@":function(t){return t.eat("{")?[null,"interpolation"]:!t.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),N.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:n,mediaFeatures:s,propertyKeywords:c,nonStandardPropertyKeywords:f,fontProperties:p,counterDescriptors:d,colorKeywords:g,valueKeywords:v,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=x)(t,e)}},name:"css",helperType:"gss"})},"object"==typeof r&&"object"==typeof e?i(t("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)},{"../../lib/codemirror":14}],17:[function(t,e,r){var i;i=function(d){"use strict";var n={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};var o={};function m(t,e){var r,i=t.match(o[r=e]||(o[r]=new RegExp("\\s+"+r+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")));return i?/^\s*(.*?)\s*$/.exec(i[2])[1]:""}function g(t,e){return new RegExp((e?"^":"")+"</s*"+t+"s*>","i")}function s(t,e){for(var r in t)for(var i=e[r]||(e[r]=[]),n=t[r],o=n.length-1;0<=o;o--)i.unshift(n[o])}d.defineMode("htmlmixed",function(c,t){var u=d.getMode(c,{name:"xml",htmlMode:!0,multilineTagIndentFactor:t.multilineTagIndentFactor,multilineTagIndentPastTag:t.multilineTagIndentPastTag}),f={},e=t&&t.tags,r=t&&t.scriptTypes;if(s(n,f),e&&s(e,f),r)for(var i=r.length-1;0<=i;i--)f.script.unshift(["type",r[i].matches,r[i].mode]);function p(t,e){var r,i=u.token(t,e.htmlState),n=/\btag\b/.test(i);if(n&&!/[<>\s\/]/.test(t.current())&&(r=e.htmlState.tagName&&e.htmlState.tagName.toLowerCase())&&f.hasOwnProperty(r))e.inTag=r+" ";else if(e.inTag&&n&&/>$/.test(t.current())){var o=/^([\S]+) (.*)/.exec(e.inTag);e.inTag=null;var s=">"==t.current()&&function(t,e){for(var r=0;r<t.length;r++){var i=t[r];if(!i[0]||i[1].test(m(e,i[0])))return i[2]}}(f[o[1]],o[2]),a=d.getMode(c,s),l=g(o[1],!0),h=g(o[1],!1);e.token=function(t,e){return t.match(l,!1)?(e.token=p,e.localState=e.localMode=null,null):(r=t,i=h,n=e.localMode.token(t,e.localState),o=r.current(),-1<(s=o.search(i))?r.backUp(o.length-s):o.match(/<\/?$/)&&(r.backUp(o.length),r.match(i,!1)||r.match(o)),n);var r,i,n,o,s},e.localMode=a,e.localState=d.startState(a,u.indent(e.htmlState,"",""))}else e.inTag&&(e.inTag+=t.current(),t.eol()&&(e.inTag+=" "));return i}return{startState:function(){return{token:p,inTag:null,localMode:null,localState:null,htmlState:d.startState(u)}},copyState:function(t){var e;return t.localState&&(e=d.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:e,htmlState:d.copyState(u,t.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(t,e,r){return!t.localMode||/^\s*<\//.test(e)?u.indent(t.htmlState,e,r):t.localMode.indent?t.localMode.indent(t.localState,e,r):d.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||u}}}},"xml","javascript","css"),d.defineMIME("text/html","htmlmixed")},"object"==typeof r&&"object"==typeof e?i(t("../../lib/codemirror"),t("../xml/xml"),t("../javascript/javascript"),t("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],i):i(CodeMirror)},{"../../lib/codemirror":14,"../css/css":16,"../javascript/javascript":18,"../xml/xml":20}],18:[function(t,e,r){var i;i=function(ee){"use strict";ee.defineMode("javascript",function(t,u){var e,r,i,n,o,s,f=t.indentUnit,p=u.statementIndent,a=u.jsonld,l=u.json||a,h=u.typescript,c=u.wordCharacters||/[\w$\xa1-\uffff]/,d=(e=m("keyword a"),r=m("keyword b"),i=m("keyword c"),n=m("keyword d"),o=m("operator"),s={type:"atom",style:"atom"},{if:m("if"),while:e,with:e,else:r,do:r,try:r,finally:r,return:n,break:n,continue:n,new:m("new"),delete:i,void:i,throw:i,debugger:m("debugger"),var:m("var"),const:m("var"),let:m("var"),function:m("function"),catch:m("catch"),for:m("for"),switch:m("switch"),case:m("case"),default:m("default"),in:o,typeof:o,instanceof:o,true:s,false:s,null:s,undefined:s,NaN:s,Infinity:s,this:m("this"),class:m("class"),super:m("atom"),yield:i,export:m("export"),import:m("import"),extends:i,await:i});function m(t){return{type:t,style:"keyword"}}var g,_,v=/[+\-*&%=<>!?|~^@]/,y=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function x(t,e,r){return g=t,_=r,e}function T(t,e){var n,r=t.next();if('"'==r||"'"==r)return e.tokenize=(n=r,function(t,e){var r,i=!1;if(a&&"@"==t.peek()&&t.match(y))return e.tokenize=T,x("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=n||i);)i=!i&&"\\"==r;return i||(e.tokenize=T),x("string","string")}),e.tokenize(t,e);if("."==r&&t.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return x("number","number");if("."==r&&t.match(".."))return x("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return x(r);if("="==r&&t.eat(">"))return x("=>","operator");if("0"==r&&t.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return x("number","number");if(/\d/.test(r))return t.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),x("number","number");if("/"==r)return t.eat("*")?(e.tokenize=k)(t,e):t.eat("/")?(t.skipToEnd(),x("comment","comment")):te(t,e,1)?(function(t){for(var e,r=!1,i=!1;null!=(e=t.next());){if(!r){if("/"==e&&!i)return;"["==e?i=!0:i&&"]"==e&&(i=!1)}r=!r&&"\\"==e}}(t),t.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),x("regexp","string-2")):(t.eat("="),x("operator","operator",t.current()));if("`"==r)return(e.tokenize=b)(t,e);if("#"==r)return t.skipToEnd(),x("error","error");if("<"==r&&t.match("!--")||"-"==r&&t.match("->"))return t.skipToEnd(),x("comment","comment");if(v.test(r))return">"==r&&e.lexical&&">"==e.lexical.type||(t.eat("=")?"!"!=r&&"="!=r||t.eat("="):/[<>*+\-]/.test(r)&&(t.eat(r),">"==r&&t.eat(r))),x("operator","operator",t.current());if(c.test(r)){t.eatWhile(c);var i=t.current();if("."!=e.lastType){if(d.propertyIsEnumerable(i)){var o=d[i];return x(o.type,o.style,i)}if("async"==i&&t.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return x("async","keyword",i)}return x("variable","variable",i)}}function k(t,e){for(var r,i=!1;r=t.next();){if("/"==r&&i){e.tokenize=T;break}i="*"==r}return x("comment","comment")}function b(t,e){for(var r,i=!1;null!=(r=t.next());){if(!i&&("`"==r||"$"==r&&t.eat("{"))){e.tokenize=T;break}i=!i&&"\\"==r}return x("quasi","string-2",t.current())}var w="([{}])";function E(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var r=t.string.indexOf("=>",t.start);if(!(r<0)){if(h){var i=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(t.string.slice(t.start,r));i&&(r=i.index)}for(var n=0,o=!1,s=r-1;0<=s;--s){var a=t.string.charAt(s),l=w.indexOf(a);if(0<=l&&l<3){if(!n){++s;break}if(0==--n){"("==a&&(o=!0);break}}else if(3<=l&&l<6)++n;else if(c.test(a))o=!0;else if(/["'\/`]/.test(a))for(;;--s){if(0==s)return;if(t.string.charAt(s-1)==a&&"\\"!=t.string.charAt(s-2)){s--;break}}else if(o&&!n){++s;break}}o&&!n&&(e.fatArrowAt=s)}}var C={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function S(t,e,r,i,n,o){this.indented=t,this.column=e,this.type=r,this.prev=n,this.info=o,null!=i&&(this.align=i)}function A(t,e){for(var r=t.localVars;r;r=r.next)if(r.name==e)return 1;for(var i=t.context;i;i=i.prev)for(r=i.vars;r;r=r.next)if(r.name==e)return 1}var L={state:null,column:null,marked:null,cc:null};function N(){for(var t=arguments.length-1;0<=t;t--)L.cc.push(arguments[t])}function O(){return N.apply(null,arguments),!0}function I(t,e){for(var r=e;r;r=r.next)if(r.name==t)return 1}function R(t){var e=L.state;if(L.marked="def",e.context)if("var"==e.lexical.info&&e.context&&e.context.block){var r=function t(e,r){{if(r){if(r.block){var i=t(e,r.prev);return i?i==r.prev?r:new D(i,r.vars,!0):null}return I(e,r.vars)?r:new D(r.prev,new P(e,r.vars),!1)}return null}}(t,e.context);if(null!=r)return void(e.context=r)}else if(!I(t,e.localVars))return void(e.localVars=new P(t,e.localVars));u.globalVars&&!I(t,e.globalVars)&&(e.globalVars=new P(t,e.globalVars))}function M(t){return"public"==t||"private"==t||"protected"==t||"abstract"==t||"readonly"==t}function D(t,e,r){this.prev=t,this.vars=e,this.block=r}function P(t,e){this.name=t,this.next=e}var B=new P("this",new P("arguments",null));function U(){L.state.context=new D(L.state.context,L.state.localVars,!1),L.state.localVars=B}function F(){L.state.context=new D(L.state.context,L.state.localVars,!0),L.state.localVars=null}function H(){L.state.localVars=L.state.context.vars,L.state.context=L.state.context.prev}function z(i,n){function t(){var t=L.state,e=t.indented;if("stat"==t.lexical.type)e=t.lexical.indented;else for(var r=t.lexical;r&&")"==r.type&&r.align;r=r.prev)e=r.indented;t.lexical=new S(e,L.stream.column(),i,null,t.lexical,n)}return t.lex=!0,t}function W(){var t=L.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function q(r){return function t(e){return e==r?O():";"==r||"}"==e||")"==e||"]"==e?N():O(t)}}function G(t,e){return"var"==t?O(z("vardef",e),Et,q(";"),W):"keyword a"==t?O(z("form"),K,G,W):"keyword b"==t?O(z("form"),G,W):"keyword d"==t?L.stream.match(/^\s*$/,!1)?O():O(z("stat"),Q,q(";"),W):"debugger"==t?O(q(";")):"{"==t?O(z("}"),F,ft,W,H):";"==t?O():"if"==t?("else"==L.state.lexical.info&&L.state.cc[L.state.cc.length-1]==W&&L.state.cc.pop()(),O(z("form"),K,G,W,Ot)):"function"==t?O(Dt):"for"==t?O(z("form"),It,G,W):"class"==t||h&&"interface"==e?(L.marked="keyword",O(z("form","class"==t?t:e),Ht,W)):"variable"==t?h&&"declare"==e?(L.marked="keyword",O(G)):h&&("module"==e||"enum"==e||"type"==e)&&L.stream.match(/^\s*\w/,!1)?(L.marked="keyword","enum"==e?O(Zt):"type"==e?O(Bt,q("operator"),_t,q(";")):O(z("form"),Ct,q("{"),z("}"),ft,W,W)):h&&"namespace"==e?(L.marked="keyword",O(z("form"),V,G,W)):h&&"abstract"==e?(L.marked="keyword",O(G)):O(z("stat"),ot):"switch"==t?O(z("form"),K,q("{"),z("}","switch"),F,ft,W,W,H):"case"==t?O(V,q(":")):"default"==t?O(q(":")):"catch"==t?O(z("form"),U,j,G,W,H):"export"==t?O(z("stat"),Gt,W):"import"==t?O(z("stat"),Vt,W):"async"==t?O(G):"@"==e?O(V,G):N(z("stat"),V,q(";"),W)}function j(t){if("("==t)return O(Ut,q(")"))}function V(t,e){return $(t,e,!1)}function Y(t,e){return $(t,e,!0)}function K(t){return"("!=t?N():O(z(")"),V,q(")"),W)}function $(t,e,r){if(L.state.fatArrowAt==L.stream.start){var i=r?rt:et;if("("==t)return O(U,z(")"),ct(Ut,")"),W,q("=>"),i,H);if("variable"==t)return N(U,Ct,q("=>"),i,H)}var n,o=r?Z:X;return C.hasOwnProperty(t)?O(o):"function"==t?O(Dt,o):"class"==t||h&&"interface"==e?(L.marked="keyword",O(z("form"),Ft,W)):"keyword c"==t||"async"==t?O(r?Y:V):"("==t?O(z(")"),Q,q(")"),W,o):"operator"==t||"spread"==t?O(r?Y:V):"["==t?O(z("]"),Xt,W,o):"{"==t?ut(at,"}",null,o):"quasi"==t?N(J,o):"new"==t?O((n=r,function(t){return"."==t?O(n?nt:it):"variable"==t&&h?O(kt,n?Z:X):N(n?Y:V)})):"import"==t?O(V):O()}function Q(t){return t.match(/[;\}\)\],]/)?N():N(V)}function X(t,e){return","==t?O(V):Z(t,e,!1)}function Z(t,e,r){var i=0==r?X:Z,n=0==r?V:Y;return"=>"==t?O(U,r?rt:et,H):"operator"==t?/\+\+|--/.test(e)||h&&"!"==e?O(i):h&&"<"==e&&L.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?O(z(">"),ct(_t,">"),W,i):"?"==e?O(V,q(":"),n):O(n):"quasi"==t?N(J,i):";"!=t?"("==t?ut(Y,")","call",i):"."==t?O(st,i):"["==t?O(z("]"),Q,q("]"),W,i):h&&"as"==e?(L.marked="keyword",O(_t,i)):"regexp"==t?(L.state.lastType=L.marked="operator",L.stream.backUp(L.stream.pos-L.stream.start-1),O(n)):void 0:void 0}function J(t,e){return"quasi"!=t?N():"${"!=e.slice(e.length-2)?O(J):O(V,tt)}function tt(t){if("}"==t)return L.marked="string-2",L.state.tokenize=b,O(J)}function et(t){return E(L.stream,L.state),N("{"==t?G:V)}function rt(t){return E(L.stream,L.state),N("{"==t?G:Y)}function it(t,e){if("target"==e)return L.marked="keyword",O(X)}function nt(t,e){if("target"==e)return L.marked="keyword",O(Z)}function ot(t){return":"==t?O(W,G):N(X,q(";"),W)}function st(t){if("variable"==t)return L.marked="property",O()}function at(t,e){if("async"==t)return L.marked="property",O(at);if("variable"==t||"keyword"==L.style){return(L.marked="property","get"==e||"set"==e)?O(lt):(h&&L.state.fatArrowAt==L.stream.start&&(r=L.stream.match(/^\s*:\s*/,!1))&&(L.state.fatArrowAt=L.stream.pos+r[0].length),O(ht));var r}else{if("number"==t||"string"==t)return L.marked=a?"property":L.style+" property",O(ht);if("jsonld-keyword"==t)return O(ht);if(h&&M(e))return L.marked="keyword",O(at);if("["==t)return O(V,pt,q("]"),ht);if("spread"==t)return O(Y,ht);if("*"==e)return L.marked="keyword",O(at);if(":"==t)return N(ht)}}function lt(t){return"variable"!=t?N(ht):(L.marked="property",O(Dt))}function ht(t){return":"==t?O(Y):"("==t?N(Dt):void 0}function ct(i,n,o){function s(t,e){if(o?-1<o.indexOf(t):","==t){var r=L.state.lexical;return"call"==r.info&&(r.pos=(r.pos||0)+1),O(function(t,e){return t==n||e==n?N():N(i)},s)}return t==n||e==n?O():o&&-1<o.indexOf(";")?N(i):O(q(n))}return function(t,e){return t==n||e==n?O():N(i,s)}}function ut(t,e,r){for(var i=3;i<arguments.length;i++)L.cc.push(arguments[i]);return O(z(e,r),ct(t,e),W)}function ft(t){return"}"==t?O():N(G,ft)}function pt(t,e){if(h){if(":"==t)return O(_t);if("?"==e)return O(pt)}}function dt(t,e){if(h&&(":"==t||"in"==e))return O(_t)}function mt(t){if(h&&":"==t)return L.stream.match(/^\s*\w+\s+is\b/,!1)?O(V,gt,_t):O(_t)}function gt(t,e){if("is"==e)return L.marked="keyword",O()}function _t(t,e){return"keyof"==e||"typeof"==e||"infer"==e?(L.marked="keyword",O("typeof"==e?Y:_t)):"variable"==t||"void"==e?(L.marked="type",O(Tt)):"|"==e||"&"==e?O(_t):"string"==t||"number"==t||"atom"==t?O(Tt):"["==t?O(z("]"),ct(_t,"]",","),W,Tt):"{"==t?O(z("}"),ct(yt,"}",",;"),W,Tt):"("==t?O(ct(xt,")"),vt,Tt):"<"==t?O(ct(_t,">"),_t):void 0}function vt(t){if("=>"==t)return O(_t)}function yt(t,e){return"variable"==t||"keyword"==L.style?(L.marked="property",O(yt)):"?"==e||"number"==t||"string"==t?O(yt):":"==t?O(_t):"["==t?O(q("variable"),dt,q("]"),yt):"("==t?N(Pt,yt):void 0}function xt(t,e){return"variable"==t&&L.stream.match(/^\s*[?:]/,!1)||"?"==e?O(xt):":"==t?O(_t):"spread"==t?O(xt):N(_t)}function Tt(t,e){return"<"==e?O(z(">"),ct(_t,">"),W,Tt):"|"==e||"."==t||"&"==e?O(_t):"["==t?O(_t,q("]"),Tt):"extends"==e||"implements"==e?(L.marked="keyword",O(_t)):"?"==e?O(_t,q(":"),_t):void 0}function kt(t,e){if("<"==e)return O(z(">"),ct(_t,">"),W,Tt)}function bt(){return N(_t,wt)}function wt(t,e){if("="==e)return O(_t)}function Et(t,e){return"enum"==e?(L.marked="keyword",O(Zt)):N(Ct,pt,Lt,Nt)}function Ct(t,e){return h&&M(e)?(L.marked="keyword",O(Ct)):"variable"==t?(R(e),O()):"spread"==t?O(Ct):"["==t?ut(At,"]"):"{"==t?ut(St,"}"):void 0}function St(t,e){return"variable"!=t||L.stream.match(/^\s*:/,!1)?("variable"==t&&(L.marked="property"),"spread"==t?O(Ct):"}"==t?N():"["==t?O(V,q("]"),q(":"),St):O(q(":"),Ct,Lt)):(R(e),O(Lt))}function At(){return N(Ct,Lt)}function Lt(t,e){if("="==e)return O(Y)}function Nt(t){if(","==t)return O(Et)}function Ot(t,e){if("keyword b"==t&&"else"==e)return O(z("form","else"),G,W)}function It(t,e){return"await"==e?O(It):"("==t?O(z(")"),Rt,W):void 0}function Rt(t){return"var"==t?O(Et,Mt):("variable"==t?O:N)(Mt)}function Mt(t,e){return")"==t?O():";"==t?O(Mt):"in"==e||"of"==e?(L.marked="keyword",O(V,Mt)):N(V,Mt)}function Dt(t,e){return"*"==e?(L.marked="keyword",O(Dt)):"variable"==t?(R(e),O(Dt)):"("==t?O(U,z(")"),ct(Ut,")"),W,mt,G,H):h&&"<"==e?O(z(">"),ct(bt,">"),W,Dt):void 0}function Pt(t,e){return"*"==e?(L.marked="keyword",O(Pt)):"variable"==t?(R(e),O(Pt)):"("==t?O(U,z(")"),ct(Ut,")"),W,mt,H):h&&"<"==e?O(z(">"),ct(bt,">"),W,Pt):void 0}function Bt(t,e){return"keyword"==t||"variable"==t?(L.marked="type",O(Bt)):"<"==e?O(z(">"),ct(bt,">"),W):void 0}function Ut(t,e){return"@"==e&&O(V,Ut),"spread"==t?O(Ut):h&&M(e)?(L.marked="keyword",O(Ut)):h&&"this"==t?O(pt,Lt):N(Ct,pt,Lt)}function Ft(t,e){return("variable"==t?Ht:zt)(t,e)}function Ht(t,e){if("variable"==t)return R(e),O(zt)}function zt(t,e){return"<"==e?O(z(">"),ct(bt,">"),W,zt):"extends"==e||"implements"==e||h&&","==t?("implements"==e&&(L.marked="keyword"),O(h?_t:V,zt)):"{"==t?O(z("}"),Wt,W):void 0}function Wt(t,e){return"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e||h&&M(e))&&L.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(L.marked="keyword",O(Wt)):"variable"==t||"keyword"==L.style?(L.marked="property",O(h?qt:Dt,Wt)):"number"==t||"string"==t?O(h?qt:Dt,Wt):"["==t?O(V,pt,q("]"),h?qt:Dt,Wt):"*"==e?(L.marked="keyword",O(Wt)):h&&"("==t?N(Pt,Wt):";"==t||","==t?O(Wt):"}"==t?O():"@"==e?O(V,Wt):void 0}function qt(t,e){if("?"==e)return O(qt);if(":"==t)return O(_t,Lt);if("="==e)return O(Y);var r=L.state.lexical.prev;return N(r&&"interface"==r.info?Pt:Dt)}function Gt(t,e){return"*"==e?(L.marked="keyword",O(Qt,q(";"))):"default"==e?(L.marked="keyword",O(V,q(";"))):"{"==t?O(ct(jt,"}"),Qt,q(";")):N(G)}function jt(t,e){return"as"==e?(L.marked="keyword",O(q("variable"))):"variable"==t?N(Y,jt):void 0}function Vt(t){return"string"==t?O():"("==t?N(V):N(Yt,Kt,Qt)}function Yt(t,e){return"{"==t?ut(Yt,"}"):("variable"==t&&R(e),"*"==e&&(L.marked="keyword"),O($t))}function Kt(t){if(","==t)return O(Yt,Kt)}function $t(t,e){if("as"==e)return L.marked="keyword",O(Yt)}function Qt(t,e){if("from"==e)return L.marked="keyword",O(V)}function Xt(t){return"]"==t?O():N(ct(Y,"]"))}function Zt(){return N(z("form"),Ct,q("{"),z("}"),ct(Jt,"}"),W,W)}function Jt(){return N(Ct,Lt)}function te(t,e,r){return e.tokenize==T&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(r||0)))}return W.lex=H.lex=!0,{startState:function(t){var e={tokenize:T,lastType:"sof",cc:[],lexical:new S((t||0)-f,0,"block",!1),localVars:u.localVars,context:u.localVars&&new D(null,null,!1),indented:t||0};return u.globalVars&&"object"==typeof u.globalVars&&(e.globalVars=u.globalVars),e},token:function(t,e){if(t.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=t.indentation(),E(t,e)),e.tokenize!=k&&t.eatSpace())return null;var r=e.tokenize(t,e);return"comment"==g?r:(e.lastType="operator"!=g||"++"!=_&&"--"!=_?g:"incdec",function(t,e,r,i,n){var o=t.cc;for(L.state=t,L.stream=n,L.marked=null,L.cc=o,L.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;){if((o.length?o.pop():l?V:G)(r,i)){for(;o.length&&o[o.length-1].lex;)o.pop()();return L.marked?L.marked:"variable"==r&&A(t,i)?"variable-2":e}}}(e,r,g,_,t))},indent:function(t,e){if(t.tokenize==k)return ee.Pass;if(t.tokenize!=T)return 0;var r,i=e&&e.charAt(0),n=t.lexical;if(!/^\s*else\b/.test(e))for(var o=t.cc.length-1;0<=o;--o){var s=t.cc[o];if(s==W)n=n.prev;else if(s!=Ot)break}for(;("stat"==n.type||"form"==n.type)&&("}"==i||(r=t.cc[t.cc.length-1])&&(r==X||r==Z)&&!/^[,\.=+\-*:?[\(]/.test(e));)n=n.prev;p&&")"==n.type&&"stat"==n.prev.type&&(n=n.prev);var a,l,h=n.type,c=i==h;return"vardef"==h?n.indented+("operator"==t.lastType||","==t.lastType?n.info.length+1:0):"form"==h&&"{"==i?n.indented:"form"==h?n.indented+f:"stat"==h?n.indented+(l=e,"operator"==(a=t).lastType||","==a.lastType||v.test(l.charAt(0))||/[,.]/.test(l.charAt(0))?p||f:0):"switch"!=n.info||c||0==u.doubleIndentSwitch?n.align?n.column+(c?0:1):n.indented+(c?0:f):n.indented+(/^(?:case|default)\b/.test(e)?f:2*f)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:a,jsonMode:l,expressionAllowed:te,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=V&&e!=Y||t.cc.pop()}}}),ee.registerHelper("wordChars","javascript",/[\w$]/),ee.defineMIME("text/javascript","javascript"),ee.defineMIME("text/ecmascript","javascript"),ee.defineMIME("application/javascript","javascript"),ee.defineMIME("application/x-javascript","javascript"),ee.defineMIME("application/ecmascript","javascript"),ee.defineMIME("application/json",{name:"javascript",json:!0}),ee.defineMIME("application/x-json",{name:"javascript",json:!0}),ee.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),ee.defineMIME("text/typescript",{name:"javascript",typescript:!0}),ee.defineMIME("application/typescript",{name:"javascript",typescript:!0})},"object"==typeof r&&"object"==typeof e?i(t("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)},{"../../lib/codemirror":14}],19:[function(t,e,r){var i;i=function(h){"use strict";function t(t){for(var e={},r=t.split(" "),i=0;i<r.length;++i)e[r[i]]=!0;return e}function a(n,o,s){return 0==n.length?l(o):function(t,e){for(var r=n[0],i=0;i<r.length;i++)if(t.match(r[i][0]))return e.tokenize=a(n.slice(1),o),r[i][1];return e.tokenize=l(o,s),"string"}}function l(r,i){return function(t,e){return function(t,e,r,i){if(!1!==i&&t.match("${",!1)||t.match("{$",!1))return e.tokenize=null,"string";if(!1!==i&&t.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/))return t.match("[",!1)&&(e.tokenize=a([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]],r,i)),t.match(/\-\>\w/,!1)&&(e.tokenize=a([[["->",null]],[[/[\w]+/,"variable"]]],r,i)),"variable-2";var n=!1;for(;!t.eol()&&(n||!1===i||!t.match("{$",!1)&&!t.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!n&&t.match(r)){e.tokenize=null,e.tokStack.pop(),e.tokStack.pop();break}n="\\"==t.next()&&!n}return"string"}(t,e,r,i)}}var e="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally",r="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",i="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";h.registerHelper("hintWords","php",[e,r,i].join(" ").split(" ")),h.registerHelper("wordChars","php",/[\w$]/);var n={name:"clike",helperType:"php",keywords:t(e),blockKeywords:t("catch do else elseif for foreach if switch try while finally"),defKeywords:t("class function interface namespace trait"),atoms:t(r),builtin:t(i),multiLineStrings:!0,hooks:{$:function(t){return t.eatWhile(/[\w\$_]/),"variable-2"},"<":function(t,e){var r;if(r=t.match(/<<\s*/)){var i=t.eat(/['"]/);t.eatWhile(/[\w\.]/);var n=t.current().slice(r[0].length+(i?2:1));if(i&&t.eat(i),n)return(e.tokStack||(e.tokStack=[])).push(n,0),e.tokenize=l(n,"'"!=i),"string"}return!1},"#":function(t){for(;!t.eol()&&!t.match("?>",!1);)t.next();return"comment"},"/":function(t){if(t.eat("/")){for(;!t.eol()&&!t.match("?>",!1);)t.next();return"comment"}return!1},'"':function(t,e){return(e.tokStack||(e.tokStack=[])).push('"',0),e.tokenize=l('"'),"string"},"{":function(t,e){return e.tokStack&&e.tokStack.length&&e.tokStack[e.tokStack.length-1]++,!1},"}":function(t,e){return e.tokStack&&0<e.tokStack.length&&!--e.tokStack[e.tokStack.length-1]&&(e.tokenize=l(e.tokStack[e.tokStack.length-2])),!1}}};h.defineMode("php",function(t,r){var a=h.getMode(t,r&&r.htmlMode||"text/html"),l=h.getMode(t,n);return{startState:function(){var t=h.startState(a),e=r.startOpen?h.startState(l):null;return{html:t,php:e,curMode:r.startOpen?l:a,curState:r.startOpen?e:t,pending:null}},copyState:function(t){var e,r=t.html,i=h.copyState(a,r),n=t.php,o=n&&h.copyState(l,n);return e=t.curMode==a?i:o,{html:i,php:o,curMode:t.curMode,curState:e,pending:t.pending}},token:function(t,e){var r=e.curMode==l;if(t.sol()&&e.pending&&'"'!=e.pending&&"'"!=e.pending&&(e.pending=null),r)return r&&null==e.php.tokenize&&t.match("?>")?(e.curMode=a,e.curState=e.html,e.php.context.prev||(e.php=null),"meta"):l.token(t,e.curState);if(t.match(/^<\?\w*/))return e.curMode=l,e.php||(e.php=h.startState(l,a.indent(e.html,"",""))),e.curState=e.php,"meta";if('"'==e.pending||"'"==e.pending){for(;!t.eol()&&t.next()!=e.pending;);var i="string"}else if(e.pending&&t.pos<e.pending.end){t.pos=e.pending.end;i=e.pending.style}else i=a.token(t,e.curState);e.pending&&(e.pending=null);var n,o=t.current(),s=o.search(/<\?/);return-1!=s&&("string"==i&&(n=o.match(/[\'\"]$/))&&!/\?>/.test(o)?e.pending=n[0]:e.pending={end:t.pos,style:i},t.backUp(o.length-s)),i},indent:function(t,e,r){return t.curMode!=l&&/^\s*<\//.test(e)||t.curMode==l&&/^\?>/.test(e)?a.indent(t.html,e,r):t.curMode.indent(t.curState,e,r)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(t){return{state:t.curState,mode:t.curMode}}}},"htmlmixed","clike"),h.defineMIME("application/x-httpd-php","php"),h.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),h.defineMIME("text/x-php",n)},"object"==typeof r&&"object"==typeof e?i(t("../../lib/codemirror"),t("../htmlmixed/htmlmixed"),t("../clike/clike")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],i):i(CodeMirror)},{"../../lib/codemirror":14,"../clike/clike":15,"../htmlmixed/htmlmixed":17}],20:[function(t,e,r){var i;i=function(b){"use strict";var w={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},E={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};b.defineMode("xml",function(t,e){var s,o,a=t.indentUnit,l={},r=e.htmlMode?w:E;for(var i in r)l[i]=r[i];for(var i in e)l[i]=e[i];function h(e,r){function t(t){return(r.tokenize=t)(e,r)}var i=e.next();return"<"==i?e.eat("!")?e.eat("[")?e.match("CDATA[")?t(n("atom","]]>")):null:e.match("--")?t(n("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),t(function i(n){return function(t,e){for(var r;null!=(r=t.next());){if("<"==r)return e.tokenize=i(n+1),e.tokenize(t,e);if(">"==r){if(1!=n)return e.tokenize=i(n-1),e.tokenize(t,e);e.tokenize=h;break}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),r.tokenize=n("meta","?>"),"meta"):(s=e.eat("/")?"closeTag":"openTag",r.tokenize=c,"tag bracket"):"&"!=i?(e.eatWhile(/[^&<]/),null):(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error"}function c(t,e){var r=t.next();if(">"==r||"/"==r&&t.eat(">"))return e.tokenize=h,s=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return s="equals",null;if("<"!=r)return/[\'\"]/.test(r)?(e.tokenize=(i=r,o.isInAttribute=!0,o),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word");e.tokenize=h,e.state=d,e.tagName=e.tagStart=null;var i,n=e.tokenize(t,e);return n?n+" tag error":"tag error";function o(t,e){for(;!t.eol();)if(t.next()==i){e.tokenize=c;break}return"string"}}function n(r,i){return function(t,e){for(;!t.eol();){if(t.match(i)){e.tokenize=h;break}t.next()}return r}}function u(t,e,r){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=r,(l.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function f(t){t.context&&(t.context=t.context.prev)}function p(t,e){for(var r;;){if(!t.context)return;if(r=t.context.tagName,!l.contextGrabbers.hasOwnProperty(r)||!l.contextGrabbers[r].hasOwnProperty(e))return;f(t)}}function d(t,e,r){return"openTag"==t?(r.tagStart=e.column(),m):"closeTag"==t?g:d}function m(t,e,r){return"word"==t?(r.tagName=e.current(),o="tag",y):l.allowMissingTagName&&"endTag"==t?(o="tag bracket",y(t,e,r)):(o="error",m)}function g(t,e,r){if("word"!=t)return l.allowMissingTagName&&"endTag"==t?(o="tag bracket",_(t,e,r)):(o="error",v);var i=e.current();return r.context&&r.context.tagName!=i&&l.implicitlyClosed.hasOwnProperty(r.context.tagName)&&f(r),r.context&&r.context.tagName==i||!1===l.matchClosing?(o="tag",_):(o="tag error",v)}function _(t,e,r){return"endTag"!=t?(o="error",_):(f(r),d)}function v(t,e,r){return o="error",_(t,0,r)}function y(t,e,r){if("word"==t)return o="attribute",x;if("endTag"!=t&&"selfcloseTag"!=t)return o="error",y;var i=r.tagName,n=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(i)?p(r,i):(p(r,i),r.context=new u(r,i,n==r.indented)),d}function x(t,e,r){return"equals"==t?T:(l.allowMissing||(o="error"),y(t,0,r))}function T(t,e,r){return"string"==t?k:"word"==t&&l.allowUnquoted?(o="string",y):(o="error",y(t,0,r))}function k(t,e,r){return"string"==t?k:y(t,0,r)}return h.isInText=!0,{startState:function(t){var e={tokenize:h,state:d,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;s=null;var r=e.tokenize(t,e);return(r||s)&&"comment"!=r&&(o=null,e.state=e.state(s||r,t,e),o&&(r="error"==o?r+" error":o)),r},indent:function(t,e,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+a;if(i&&i.noIndent)return b.Pass;if(t.tokenize!=c&&t.tokenize!=h)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+a*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/<!\[CDATA\[/.test(e))return 0;var n=e&&/^<(\/)?([\w_:\.-]*)/.exec(e);if(n&&n[1])for(;i;){if(i.tagName==n[2]){i=i.prev;break}if(!l.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(n)for(;i;){var o=l.contextGrabbers[i.tagName];if(!o||!o.hasOwnProperty(n[2]))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+a:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==T&&(t.state=y)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:"closeTag"==t.type}:null},xmlCurrentContext:function(t){for(var e=[],r=t.context;r;r=r.prev)r.tagName&&e.push(r.tagName);return e.reverse()}}}),b.defineMIME("text/xml","xml"),b.defineMIME("application/xml","xml"),b.mimeModes.hasOwnProperty("text/html")||b.defineMIME("text/html",{name:"xml",htmlMode:!0})},"object"==typeof r&&"object"==typeof e?i(t("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)},{"../../lib/codemirror":14}],21:[function(t,e,r){r.read=function(t,e,r,i,n){var o,s,a=8*n-i-1,l=(1<<a)-1,h=l>>1,c=-7,u=r?n-1:0,f=r?-1:1,p=t[e+u];for(u+=f,o=p&(1<<-c)-1,p>>=-c,c+=a;0<c;o=256*o+t[e+u],u+=f,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=i;0<c;s=256*s+t[e+u],u+=f,c-=8);if(0===o)o=1-h;else{if(o===l)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,i),o-=h}return(p?-1:1)*s*Math.pow(2,o-i)},r.write=function(t,e,r,i,n,o){var s,a,l,h=8*o-n-1,c=(1<<h)-1,u=c>>1,f=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:o-1,d=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),2<=(e+=1<=s+u?f/l:f*Math.pow(2,1-u))*l&&(s++,l/=2),c<=s+u?(a=0,s=c):1<=s+u?(a=(e*l-1)*Math.pow(2,n),s+=u):(a=e*Math.pow(2,u-1)*Math.pow(2,n),s=0));8<=n;t[r+p]=255&a,p+=d,a/=256,n-=8);for(s=s<<n|a,h+=n;0<h;t[r+p]=255&s,p+=d,s/=256,h-=8);t[r+p-d]|=128*m}},{}],22:[function(t,i,n){(function(t){var e,r;e=window,r=function(){return(i={},n.m=r=[function(t,e,r){"use strict";var i=r(2);t.exports=i.extends("statement",function(t,e,r){i.apply(this,[t||"statement",e,r])})},function(t,e,r){"use strict";var i=r(2),n="expression";t.exports=i.extends(n,function(t,e,r){i.apply(this,[t||n,e,r])})},function(t,e,r){"use strict";function i(t,e,r){this.kind=t,e&&(this.leadingComments=e),r&&(this.loc=r)}i.prototype.setTrailingComments=function(t){this.trailingComments=t},i.prototype.destroy=function(t){if(!t)throw new Error("Node already initialized, you must swap with another node");return this.leadingComments&&(t.leadingComments?t.leadingComments=Array.concat(this.leadingComments,t.leadingComments):t.leadingComments=this.leadingComments),this.trailingComments&&(t.trailingComments?t.trailingComments=Array.concat(this.trailingComments,t.trailingComments):t.trailingComments=this.trailingComments),t},i.prototype.includeToken=function(t){return this.loc&&(this.loc.end&&(this.loc.end.line=t.lexer.yylloc.last_line,this.loc.end.column=t.lexer.yylloc.last_column,this.loc.end.offset=t.lexer.offset),t.ast.withSource&&(this.loc.source=t.lexer._input.substring(this.loc.start.offset,t.lexer.offset))),this},i.extends=function(t,e){return e.prototype=Object.create(this.prototype),e.extends=this.extends,(e.prototype.constructor=e).kind=t,e},t.exports=i},function(t,e,r){"use strict";var o=r(1);t.exports=o.extends("literal",function(t,e,r,i,n){o.apply(this,[t||"literal",i,n]),this.value=e,r&&(this.raw=r)})},function(t,e,r){"use strict";var i=r(1);t.exports=i.extends("operation",function(t,e,r){i.apply(this,[t||"operation",e,r])})},function(t,e,r){"use strict";var n=r(0),o="declaration",i=n.extends(o,function(t,e,r,i){n.apply(this,[t||o,r,i]),this.name=e});i.prototype.parseFlags=function(t){this.isAbstract=1===t[2],this.isFinal=2===t[2],"class"!==this.kind&&(-1===t[0]?this.visibility="":null===t[0]?this.visibility=null:0===t[0]?this.visibility="public":1===t[0]?this.visibility="protected":2===t[0]&&(this.visibility="private"),this.isStatic=1===t[1])},t.exports=i},function(t,e,r){"use strict";var i=r(2),n=i.extends("reference",function(t,e,r){i.apply(this,[t||"reference",e,r])});t.exports=n},function(t,e,r){"use strict";var n=r(0);t.exports=n.extends("block",function(t,e,r,i){n.apply(this,[t||"block",r,i]),this.children=e.filter(Boolean)})},function(t,e,r){"use strict";var o=r(1);t.exports=o.extends("lookup",function(t,e,r,i,n){o.apply(this,[t||"lookup",i,n]),this.what=e,this.offset=r})},function(t,e,r){"use strict";var n=r(2);t.exports=n.extends("comment",function(t,e,r,i){n.apply(this,[t,r,i]),this.value=e})},function(t,e,r){"use strict";var n=r(0),o="constantstatement";t.exports=n.extends(o,function(t,e,r,i){n.apply(this,[t||o,r,i]),this.constants=e})},function(t,e,r){"use strict";var a=r(5);t.exports=a.extends("function",function(t,e,r,i,n,o,s){a.apply(this,["function",t,o,s]),this.arguments=e,this.byref=r,this.type=i,this.nullable=n,this.body=null})},function(t,e,c){"use strict";(function(e){function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r=c(18),i=c(28),n=c(44),o=c(45);function a(t,e){for(var r=Object.keys(t),i=r.length;i--;){var n=r[i],o=t[n];null===o?delete e[n]:"function"==typeof o?e[n]=o.bind(e):Array.isArray(o)?e[n]=Array.isArray(e[n])?e[n].concat(o):o:"object"===s(o)?e[n]="object"===s(e[n])?a(o,e[n]):o:e[n]=o}return e}function l(t){if("function"==typeof this)return new this(t);this.tokens=n,this.lexer=new r(this),this.ast=new o,this.parser=new i(this.lexer,this.ast),t&&"object"===s(t)&&(t.parser&&!1===t.parser.php7&&(t.lexer||(t.lexer={}),t.lexer.php7=!1),a(t,this))}function h(t){return e.isBuffer(t)?t.toString():t}l.create=function(t){return new l(t)},l.parseEval=function(t,e){return new l(e).parseEval(t)},l.prototype.parseEval=function(t){return this.lexer.mode_eval=!0,this.lexer.all_tokens=!1,t=h(t),this.parser.parse(t,"eval")},l.parseCode=function(t,e,r){return"object"!==s(e)||r||(r=e,e="unknown"),new l(r).parseCode(t,e)},l.prototype.parseCode=function(t,e){return this.lexer.mode_eval=!1,this.lexer.all_tokens=!1,t=h(t),this.parser.parse(t,e)},l.tokenGetAll=function(t,e){return new l(e).tokenGetAll(t)},l.prototype.tokenGetAll=function(t){this.lexer.mode_eval=!1,this.lexer.all_tokens=!0,t=h(t);var e=this.lexer.EOF,r=this.tokens.values;this.lexer.setInput(t);for(var i=this.lexer.lex()||e,n=[];i!=e;){var o=this.lexer.yytext;r.hasOwnProperty(i)&&(o=[r[i],o,this.lexer.yylloc.first_line]),n.push(o),i=this.lexer.lex()||e}return n},t.exports=l,t.exports.tokens=n,t.exports.lexer=r,t.exports.AST=o,t.exports.parser=i,t.exports.combine=a,t.exports.default=l}).call(this,c(13).Buffer)},function(t,F,e){"use strict";(function(t){var i=e(15),o=e(16),s=e(17);function r(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(r()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,r);if("number"!=typeof t)return n(this,t,e,r);if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return h(this,t)}function n(t,e,r,i){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,i){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(i||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,r):new Uint8Array(e,r,i);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=c(t,e);return t}(t,e,r,i):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var i=0|p(e,r),n=(t=a(t,i)).write(e,r);n!==i&&(t=t.slice(0,n));return t}(t,e,r):function(t,e){if(u.isBuffer(e)){var r=0|f(e.length);return 0===(t=a(t,r)).length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||function(t){return t!=t}(e.length)?a(t,0):c(t,e);if("Buffer"===e.type&&s(e.data))return c(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function h(t,e){if(l(e),t=a(t,e<0?0:0|f(e)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function c(t,e){var r=e.length<0?0:0|f(e.length);t=a(t,r);for(var i=0;i<r;i+=1)t[i]=255&e[i];return t}function f(t){if(t>=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return P(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return B(t).length;default:if(i)return P(t).length;e=(""+e).toLowerCase(),i=!0}}function d(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function m(t,e,r,i,n){if(0===t.length)return-1;if("string"==typeof r?(i=r,r=0):2147483647<r?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof e&&(e=u.from(e,i)),u.isBuffer(e))return 0===e.length?-1:g(t,e,r,i,n);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):g(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function g(t,e,r,i,n){var o,s=1,a=t.length,l=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;a/=s=2,l/=2,r/=2}function h(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(n){var c=-1;for(o=r;o<a;o++)if(h(t,o)===h(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===l)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(a<r+l&&(r=a-l),o=r;0<=o;o--){for(var u=!0,f=0;f<l;f++)if(h(t,o+f)!==h(e,f)){u=!1;break}if(u)return o}return-1}function _(t,e,r,i){r=Number(r)||0;var n=t.length-r;i?n<(i=Number(i))&&(i=n):i=n;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");o/2<i&&(i=o/2);for(var s=0;s<i;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function v(t,e,r,i){return U(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,i)}function y(t,e,r,i){return U(function(t,e){for(var r,i,n,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),i=r>>8,n=r%256,o.push(n),o.push(i);return o}(e,t.length-r),t,r,i)}function x(t,e,r){return 0===e&&r===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,r))}function T(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;n<r;){var o,s,a,l,h=t[n],c=null,u=239<h?4:223<h?3:191<h?2:1;if(n+u<=r)switch(u){case 1:h<128&&(c=h);break;case 2:128==(192&(o=t[n+1]))&&127<(l=(31&h)<<6|63&o)&&(c=l);break;case 3:o=t[n+1],s=t[n+2],128==(192&o)&&128==(192&s)&&2047<(l=(15&h)<<12|(63&o)<<6|63&s)&&(l<55296||57343<l)&&(c=l);break;case 4:o=t[n+1],s=t[n+2],a=t[n+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&65535<(l=(15&h)<<18|(63&o)<<12|(63&s)<<6|63&a)&&l<1114112&&(c=l)}null===c?(c=65533,u=1):65535<c&&(c-=65536,i.push(c>>>10&1023|55296),c=56320|1023&c),i.push(c),n+=u}return function(t){var e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);var r="",i=0;for(;i<e;)r+=String.fromCharCode.apply(String,t.slice(i,i+=k));return r}(i)}F.Buffer=u,F.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},F.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),F.kMaxLength=r(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,r){return n(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,r){return i=null,o=e,s=r,l(n=t),n<=0?a(i,n):void 0!==o?"string"==typeof s?a(i,n).fill(o,s):a(i,n).fill(o):a(i,n);var i,n,o,s},u.allocUnsafe=function(t){return h(null,t)},u.allocUnsafeSlow=function(t){return h(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,i=e.length,n=0,o=Math.min(r,i);n<o;++n)if(t[n]!==e[n]){r=t[n],i=e[n];break}return r<i?-1:i<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!s(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(r=e=0;r<t.length;++r)e+=t[r].length;var i=u.allocUnsafe(e),n=0;for(r=0;r<t.length;++r){var o=t[r];if(!u.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,n),n+=o.length}return i},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)d(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)d(this,e,e+3),d(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)d(this,e,e+7),d(this,e+1,e+6),d(this,e+2,e+5),d(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0==t?"":0===arguments.length?T(this,0,t):function(t,e,r){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t=t||"utf8";;)switch(t){case"hex":return E(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return b(this,e,r);case"latin1":case"binary":return w(this,e,r);case"base64":return x(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",e=F.INSPECT_MAX_BYTES;return 0<this.length&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,r,i,n){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw new RangeError("out of range index");if(n<=i&&r<=e)return 0;if(n<=i)return-1;if(r<=e)return 1;if(this===t)return 0;for(var o=(n>>>=0)-(i>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),l=this.slice(i,n),h=t.slice(e,r),c=0;c<a;++c)if(l[c]!==h[c]){o=l[c],s=h[c];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},u.prototype.write=function(t,e,r,i){if(void 0===e)i="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)i=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-e;if((void 0===r||n<r)&&(r=n),0<t.length&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i=i||"utf8";for(var o,s,a,l,h,c,u=!1;;)switch(i){case"hex":return _(this,t,e,r);case"utf8":case"utf-8":return h=e,c=r,U(P(t,(l=this).length-h),l,h,c);case"ascii":return v(this,t,e,r);case"latin1":case"binary":return v(this,t,e,r);case"base64":return o=this,s=e,a=r,U(B(t),o,s,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y(this,t,e,r);default:if(u)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),u=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function b(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(127&t[n]);return i}function w(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(t[n]);return i}function E(t,e,r){var i=t.length;(!e||e<0)&&(e=0),(!r||r<0||i<r)&&(r=i);for(var n="",o=e;o<r;++o)n+=D(t[o]);return n}function C(t,e,r){for(var i=t.slice(e,r),n="",o=0;o<i.length;o+=2)n+=String.fromCharCode(i[o]+256*i[o+1]);return n}function S(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(r<t+e)throw new RangeError("Trying to access beyond buffer length")}function A(t,e,r,i,n,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(n<e||e<o)throw new RangeError('"value" argument is out of bounds');if(r+i>t.length)throw new RangeError("Index out of range")}function L(t,e,r,i){e<0&&(e=65535+e+1);for(var n=0,o=Math.min(t.length-r,2);n<o;++n)t[r+n]=(e&255<<8*(i?n:1-n))>>>8*(i?n:1-n)}function N(t,e,r,i){e<0&&(e=4294967295+e+1);for(var n=0,o=Math.min(t.length-r,4);n<o;++n)t[r+n]=e>>>8*(i?n:3-n)&255}function O(t,e,r,i){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function I(t,e,r,i,n){return n||O(t,0,r,4),o.write(t,e,r,i,23,4),r+4}function R(t,e,r,i,n){return n||O(t,0,r,8),o.write(t,e,r,i,52,8),r+8}u.prototype.slice=function(t,e){var r,i=this.length;if((t=~~t)<0?(t+=i)<0&&(t=0):i<t&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):i<e&&(e=i),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=u.prototype;else{var n=e-t;r=new u(n,void 0);for(var o=0;o<n;++o)r[o]=this[o+t]}return r},u.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||S(t,e,this.length);for(var i=this[t],n=1,o=0;++o<e&&(n*=256);)i+=this[t+o]*n;return i},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||S(t,e,this.length);for(var i=this[t+--e],n=1;0<e&&(n*=256);)i+=this[t+--e]*n;return i},u.prototype.readUInt8=function(t,e){return e||S(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||S(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||S(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||S(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||S(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||S(t,e,this.length);for(var i=this[t],n=1,o=0;++o<e&&(n*=256);)i+=this[t+o]*n;return(n*=128)<=i&&(i-=Math.pow(2,8*e)),i},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||S(t,e,this.length);for(var i=e,n=1,o=this[t+--i];0<i&&(n*=256);)o+=this[t+--i]*n;return(n*=128)<=o&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||S(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||S(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||S(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||S(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||S(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||S(t,4,this.length),o.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||S(t,4,this.length),o.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||S(t,8,this.length),o.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||S(t,8,this.length),o.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,i){t=+t,e|=0,r|=0,i||A(this,t,e,r,Math.pow(2,8*r)-1,0);var n=1,o=0;for(this[e]=255&t;++o<r&&(n*=256);)this[e+o]=t/n&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,i){t=+t,e|=0,r|=0,i||A(this,t,e,r,Math.pow(2,8*r)-1,0);var n=r-1,o=1;for(this[e+n]=255&t;0<=--n&&(o*=256);)this[e+n]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):L(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):L(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):N(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e|=0,!i){var n=Math.pow(2,8*r-1);A(this,t,e,r,n-1,-n)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e|=0,!i){var n=Math.pow(2,8*r-1);A(this,t,e,r,n-1,-n)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;0<=--o&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):L(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):L(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):N(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return I(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return I(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return R(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return R(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,i){if(r=r||0,i||0===i||(i=this.length),e>=t.length&&(e=t.length),e=e||0,0<i&&i<r&&(i=r),i===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-r&&(i=t.length-e+r);var n,o=i-r;if(this===t&&r<e&&e<i)for(n=o-1;0<=n;--n)t[n+e]=this[n+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(n=0;n<o;++n)t[n+e]=this[n+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},u.prototype.fill=function(t,e,r,i){if("string"==typeof t){if("string"==typeof e?(i=e,e=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),1===t.length){var n=t.charCodeAt(0);n<256&&(t=n)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!u.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,"number"==typeof(t=t||0))for(o=e;o<r;++o)this[o]=t;else{var s=u.isBuffer(t)?t:P(new u(t,i).toString()),a=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var M=/[^+\/0-9A-Za-z-_]/g;function D(t){return t<16?"0"+t.toString(16):t.toString(16)}function P(t,e){var r;e=e||1/0;for(var i=t.length,n=null,o=[],s=0;s<i;++s){if(55295<(r=t.charCodeAt(s))&&r<57344){if(!n){if(56319<r){-1<(e-=3)&&o.push(239,191,189);continue}if(s+1===i){-1<(e-=3)&&o.push(239,191,189);continue}n=r;continue}if(r<56320){-1<(e-=3)&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&-1<(e-=3)&&o.push(239,191,189);if(n=null,r<128){if(--e<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function B(t){return i.toByteArray(function(t){var e;if((t=((e=t).trim?e.trim():e.replace(/^\s+|\s+$/g,"")).replace(M,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function U(t,e,r,i){for(var n=0;n<i&&!(n+r>=e.length||n>=t.length);++n)e[n+r]=t[n];return n}}).call(this,e(14))},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";e.byteLength=function(t){var e=u(t),r=e[0],i=e[1];return 3*(r+i)/4-i},e.toByteArray=function(t){for(var e,r=u(t),i=r[0],n=r[1],o=new c(function(t,e){return 3*(t+e)/4-e}(i,n)),s=0,a=0<n?i-4:i,l=0;l<a;l+=4)e=h[t.charCodeAt(l)]<<18|h[t.charCodeAt(l+1)]<<12|h[t.charCodeAt(l+2)]<<6|h[t.charCodeAt(l+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=255&e;2===n&&(e=h[t.charCodeAt(l)]<<2|h[t.charCodeAt(l+1)]>>4,o[s++]=255&e);1===n&&(e=h[t.charCodeAt(l)]<<10|h[t.charCodeAt(l+1)]<<4|h[t.charCodeAt(l+2)]>>2,o[s++]=e>>8&255,o[s++]=255&e);return o},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,n=[],o=0,s=r-i;o<s;o+=16383)n.push(l(t,o,s<o+16383?s:o+16383));1==i?(e=t[r-1],n.push(a[e>>2]+a[e<<4&63]+"==")):2==i&&(e=(t[r-2]<<8)+t[r-1],n.push(a[e>>10]+a[e>>4&63]+a[e<<2&63]+"="));return n.join("")};for(var a=[],h=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,o=i.length;n<o;++n)a[n]=i[n],h[i.charCodeAt(n)]=n;function u(t){var e=t.length;if(0<e%4)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,r){for(var i,n,o=[],s=e;s<r;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),o.push(a[(n=i)>>18&63]+a[n>>12&63]+a[n>>6&63]+a[63&n]);return o.join("")}h["-".charCodeAt(0)]=62,h["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,i,n){var o,s,a=8*n-i-1,l=(1<<a)-1,h=l>>1,c=-7,u=r?n-1:0,f=r?-1:1,p=t[e+u];for(u+=f,o=p&(1<<-c)-1,p>>=-c,c+=a;0<c;o=256*o+t[e+u],u+=f,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=i;0<c;s=256*s+t[e+u],u+=f,c-=8);if(0===o)o=1-h;else{if(o===l)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,i),o-=h}return(p?-1:1)*s*Math.pow(2,o-i)},e.write=function(t,e,r,i,n,o){var s,a,l,h=8*o-n-1,c=(1<<h)-1,u=c>>1,f=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:o-1,d=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),2<=(e+=1<=s+u?f/l:f*Math.pow(2,1-u))*l&&(s++,l/=2),c<=s+u?(a=0,s=c):1<=s+u?(a=(e*l-1)*Math.pow(2,n),s+=u):(a=e*Math.pow(2,u-1)*Math.pow(2,n),s=0));8<=n;t[r+p]=255&a,p+=d,a/=256,n-=8);for(s=s<<n|a,h+=n;0<h;t[r+p]=255&s,p+=d,s/=256,h-=8);t[r+p-d]|=128*m}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(t){this.engine=t,this.tok=this.engine.tokens.names,this.EOF=1,this.debug=!1,this.all_tokens=!0,this.comment_tokens=!1,this.mode_eval=!1,this.asp_tags=!1,this.short_tags=!0,this.php7=!0,this.yyprevcol=0,this.keywords={__class__:this.tok.T_CLASS_C,__trait__:this.tok.T_TRAIT_C,__function__:this.tok.T_FUNC_C,__method__:this.tok.T_METHOD_C,__line__:this.tok.T_LINE,__file__:this.tok.T_FILE,__dir__:this.tok.T_DIR,__namespace__:this.tok.T_NS_C,exit:this.tok.T_EXIT,die:this.tok.T_EXIT,function:this.tok.T_FUNCTION,const:this.tok.T_CONST,return:this.tok.T_RETURN,try:this.tok.T_TRY,catch:this.tok.T_CATCH,finally:this.tok.T_FINALLY,throw:this.tok.T_THROW,if:this.tok.T_IF,elseif:this.tok.T_ELSEIF,endif:this.tok.T_ENDIF,else:this.tok.T_ELSE,while:this.tok.T_WHILE,endwhile:this.tok.T_ENDWHILE,do:this.tok.T_DO,for:this.tok.T_FOR,endfor:this.tok.T_ENDFOR,foreach:this.tok.T_FOREACH,endforeach:this.tok.T_ENDFOREACH,declare:this.tok.T_DECLARE,enddeclare:this.tok.T_ENDDECLARE,instanceof:this.tok.T_INSTANCEOF,as:this.tok.T_AS,switch:this.tok.T_SWITCH,endswitch:this.tok.T_ENDSWITCH,case:this.tok.T_CASE,default:this.tok.T_DEFAULT,break:this.tok.T_BREAK,continue:this.tok.T_CONTINUE,goto:this.tok.T_GOTO,echo:this.tok.T_ECHO,print:this.tok.T_PRINT,class:this.tok.T_CLASS,interface:this.tok.T_INTERFACE,trait:this.tok.T_TRAIT,extends:this.tok.T_EXTENDS,implements:this.tok.T_IMPLEMENTS,new:this.tok.T_NEW,clone:this.tok.T_CLONE,var:this.tok.T_VAR,eval:this.tok.T_EVAL,include:this.tok.T_INCLUDE,include_once:this.tok.T_INCLUDE_ONCE,require:this.tok.T_REQUIRE,require_once:this.tok.T_REQUIRE_ONCE,namespace:this.tok.T_NAMESPACE,use:this.tok.T_USE,insteadof:this.tok.T_INSTEADOF,global:this.tok.T_GLOBAL,isset:this.tok.T_ISSET,empty:this.tok.T_EMPTY,__halt_compiler:this.tok.T_HALT_COMPILER,static:this.tok.T_STATIC,abstract:this.tok.T_ABSTRACT,final:this.tok.T_FINAL,private:this.tok.T_PRIVATE,protected:this.tok.T_PROTECTED,public:this.tok.T_PUBLIC,unset:this.tok.T_UNSET,list:this.tok.T_LIST,array:this.tok.T_ARRAY,callable:this.tok.T_CALLABLE,or:this.tok.T_LOGICAL_OR,and:this.tok.T_LOGICAL_AND,xor:this.tok.T_LOGICAL_XOR},this.castKeywords={int:this.tok.T_INT_CAST,integer:this.tok.T_INT_CAST,real:this.tok.T_DOUBLE_CAST,double:this.tok.T_DOUBLE_CAST,float:this.tok.T_DOUBLE_CAST,string:this.tok.T_STRING_CAST,binary:this.tok.T_STRING_CAST,array:this.tok.T_ARRAY_CAST,object:this.tok.T_OBJECT_CAST,bool:this.tok.T_BOOL_CAST,boolean:this.tok.T_BOOL_CAST,unset:this.tok.T_UNSET_CAST}}n.prototype.setInput=function(t){return this._input=t,this.size=t.length,this.yylineno=1,this.offset=0,this.yyprevcol=0,this.yytext="",this.yylloc={first_offset:0,first_line:1,first_column:0,prev_offset:0,prev_line:1,prev_column:0,last_line:1,last_column:0},this.tokens=[],this.done=this.offset>=this.size,!this.all_tokens&&this.mode_eval?(this.conditionStack=["INITIAL"],this.begin("ST_IN_SCRIPTING")):(this.conditionStack=[],this.begin("INITIAL")),this},n.prototype.input=function(){var t=this._input[this.offset];return t?(this.yytext+=t,this.offset++,"\r"===t&&"\n"===this._input[this.offset]&&(this.yytext+="\n",this.offset++),"\n"===t||"\r"===t?(this.yylloc.last_line=++this.yylineno,this.yyprevcol=this.yylloc.last_column,this.yylloc.last_column=0):this.yylloc.last_column++,t):""},n.prototype.unput=function(t){if(1===t)this.offset--,"\n"===this._input[this.offset]&&"\r"===this._input[this.offset-1]&&(this.offset--,t++),"\r"===this._input[this.offset]||"\n"===this._input[this.offset]?(this.yylloc.last_line--,this.yylineno--,this.yylloc.last_column=this.yyprevcol):this.yylloc.last_column--,this.yytext=this.yytext.substring(0,this.yytext.length-t);else if(0<t)if(this.offset-=t,t<this.yytext.length){this.yytext=this.yytext.substring(0,this.yytext.length-t),this.yylloc.last_line=this.yylloc.first_line,this.yylloc.last_column=this.yyprevcol=this.yylloc.first_column;for(var e=0;e<this.yytext.length;e++){var r=this.yytext[e];"\r"===r?(r=this.yytext[++e],this.yyprevcol=this.yylloc.last_column,this.yylloc.last_line++,this.yylloc.last_column=0,"\n"!==r&&("\r"===r?this.yylloc.last_line++:this.yylloc.last_column++)):"\n"===r?(this.yyprevcol=this.yylloc.last_column,this.yylloc.last_line++,this.yylloc.last_column=0):this.yylloc.last_column++}this.yylineno=this.yylloc.last_line}else this.yytext="",this.yylloc.last_line=this.yylineno=this.yylloc.first_line,this.yylloc.last_column=this.yylloc.first_column;return this},n.prototype.tryMatch=function(t){return t===this.ahead(t.length)},n.prototype.tryMatchCaseless=function(t){return t===this.ahead(t.length).toLowerCase()},n.prototype.ahead=function(t){var e=this._input.substring(this.offset,this.offset+t);return"\r"===e[e.length-1]&&"\n"===this._input[this.offset+t+1]&&(e+="\n"),e},n.prototype.consume=function(t){for(var e=0;e<t;e++){var r=this._input[this.offset];if(!r)break;this.yytext+=r,this.offset++,"\r"===r&&"\n"===this._input[this.offset]&&(this.yytext+="\n",this.offset++,e++),"\n"===r||"\r"===r?(this.yylloc.last_line=++this.yylineno,this.yyprevcol=this.yylloc.last_column,this.yylloc.last_column=0):this.yylloc.last_column++}return this},n.prototype.getState=function(){return{yytext:this.yytext,offset:this.offset,yylineno:this.yylineno,yyprevcol:this.yyprevcol,yylloc:{first_offset:this.yylloc.first_offset,first_line:this.yylloc.first_line,first_column:this.yylloc.first_column,last_line:this.yylloc.last_line,last_column:this.yylloc.last_column}}},n.prototype.setState=function(t){return this.yytext=t.yytext,this.offset=t.offset,this.yylineno=t.yylineno,this.yyprevcol=t.yyprevcol,this.yylloc=t.yylloc,this},n.prototype.appendToken=function(t,e){return this.tokens.push([t,e]),this},n.prototype.lex=function(){this.yylloc.prev_offset=this.offset,this.yylloc.prev_line=this.yylloc.last_line,this.yylloc.prev_column=this.yylloc.last_column;var t=this.next()||this.lex();if(!this.all_tokens){for(;t===this.tok.T_WHITESPACE||!this.comment_tokens&&(t===this.tok.T_COMMENT||t===this.tok.T_DOC_COMMENT)||t===this.tok.T_OPEN_TAG;)t=this.next()||this.lex();if(t==this.tok.T_OPEN_TAG_WITH_ECHO)return this.tok.T_ECHO;if(t===this.tok.T_CLOSE_TAG)return";"}return this.yylloc.prev_offset||(this.yylloc.prev_offset=this.yylloc.first_offset,this.yylloc.prev_line=this.yylloc.first_line,this.yylloc.prev_column=this.yylloc.first_column),t},n.prototype.begin=function(t){if(this.conditionStack.push(t),this.curCondition=t,this.stateCb=this["match"+t],"function"!=typeof this.stateCb)throw new Error('Undefined condition state "'+t+'"');return this},n.prototype.popState=function(){var t=0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0];if(this.curCondition=this.conditionStack[this.conditionStack.length-1],this.stateCb=this["match"+this.curCondition],"function"!=typeof this.stateCb)throw new Error('Undefined condition state "'+this.curCondition+'"');return t},n.prototype.next=function(){var t;if(this._input||(this.done=!0),this.yylloc.first_offset=this.offset,this.yylloc.first_line=this.yylloc.last_line,this.yylloc.first_column=this.yylloc.last_column,this.yytext="",this.done)return this.yylloc.prev_offset=this.yylloc.first_offset,this.yylloc.prev_line=this.yylloc.first_line,this.yylloc.prev_column=this.yylloc.first_column,this.EOF;if(t=0<this.tokens.length?("object"===i((t=this.tokens.shift())[1])?this.setState(t[1]):this.consume(t[1]),t[0]):this.stateCb.apply(this,[]),this.offset>=this.size&&0===this.tokens.length&&(this.done=!0),this.debug){var e=t;e="number"==typeof e?this.engine.tokens.values[e]:'"'+e+'"';var r=new Error(e+"\tfrom "+this.yylloc.first_line+","+this.yylloc.first_column+"\t - to "+this.yylloc.last_line+","+this.yylloc.last_column+'\t"'+this.yytext+'"');console.error(r.stack)}return t},[r(19),r(20),r(21),r(23),r(24),r(25),r(26),r(27)].forEach(function(t){for(var e in t)n.prototype[e]=t[e]}),t.exports=n},function(t,e,r){"use strict";t.exports={T_COMMENT:function(){for(;this.offset<this.size;){var t=this.input();if("\n"===t||"\r"===t)return this.tok.T_COMMENT;if("?"===t&&!this.aspTagMode&&">"===this._input[this.offset])return this.unput(1),this.tok.T_COMMENT;if("%"===t&&this.aspTagMode&&">"===this._input[this.offset])return this.unput(1),this.tok.T_COMMENT}return this.tok.T_COMMENT},T_DOC_COMMENT:function(){var t=this.input(),e=this.tok.T_COMMENT;if("*"===t){if(t=this.input(),this.is_WHITESPACE()&&(e=this.tok.T_DOC_COMMENT),"/"===t)return e;this.unput(1)}for(;this.offset<this.size;)if("*"===(t=this.input())&&"/"===this._input[this.offset]){this.input();break}return e}}},function(t,e,r){"use strict";t.exports={nextINITIAL:function(){return 1<this.conditionStack.length&&"INITIAL"===this.conditionStack[this.conditionStack.length-1]?this.popState():this.begin("ST_IN_SCRIPTING"),this},matchINITIAL:function(){for(;this.offset<this.size;){var t=this.input();if("<"==t)if("?"==(t=this.ahead(1))){if(this.tryMatch("?=")){this.unput(1).appendToken(this.tok.T_OPEN_TAG_WITH_ECHO,3).nextINITIAL();break}if(this.tryMatchCaseless("?php")&&(" "===(t=this._input[this.offset+4])||"\t"===t||"\n"===t||"\r"===t)){this.unput(1).appendToken(this.tok.T_OPEN_TAG,6).nextINITIAL();break}if(this.short_tags){this.unput(1).appendToken(this.tok.T_OPEN_TAG,2).nextINITIAL();break}}else if(this.asp_tags&&"%"==t){if(this.tryMatch("%=")){this.aspTagMode=!0,this.unput(1).appendToken(this.tok.T_OPEN_TAG_WITH_ECHO,3).nextINITIAL();break}this.aspTagMode=!0,this.unput(1).appendToken(this.tok.T_OPEN_TAG,2).nextINITIAL();break}}return 0<this.yytext.length&&this.tok.T_INLINE_HTML}}},function(e,t,r){"use strict";(function(t){var r=10,i="2147483648";"x64"==t.arch&&(r=19,i="9223372036854775808"),e.exports={consume_NUM:function(){var t=this.yytext[0],e="."===this.yytext[0];if("0"===t)if("x"===(t=this.input())||"X"===t){if(t=this.input(),this.is_HEX())return this.consume_HNUM();this.unput(t?2:1)}else if("b"===t||"B"===t){if("0"===(t=this.input())||"1"===t)return this.consume_BNUM();this.unput(t?2:1)}else this.is_NUM()||t&&this.unput(1);for(;this.offset<this.size;)if(t=this.input(),!this.is_NUM()){if("."!==t||e){if("e"===t||"E"===t){if("+"===(t=this.input())||"-"===t){if(t=this.input(),this.is_NUM())return this.consume_LNUM(),this.tok.T_DNUMBER;this.unput(t?3:2);break}if(this.is_NUM())return this.consume_LNUM(),this.tok.T_DNUMBER;this.unput(t?2:1);break}t&&this.unput(1);break}e=!0}return e?this.tok.T_DNUMBER:this.yytext.length<r-1||this.yytext.length<r||this.yytext.length==r&&this.yytext<i?this.tok.T_LNUMBER:this.tok.T_DNUMBER},consume_HNUM:function(){for(;this.offset<this.size;){var t=this.input();if(!this.is_HEX()){t&&this.unput(1);break}}return this.tok.T_LNUMBER},consume_LNUM:function(){for(;this.offset<this.size;){var t=this.input();if(!this.is_NUM()){t&&this.unput(1);break}}return this.tok.T_LNUMBER},consume_BNUM:function(){for(var t;this.offset<this.size;)if("0"!==(t=this.input())&&"1"!==t){t&&this.unput(1);break}return this.tok.T_LNUMBER}}}).call(this,r(22))},function(t,e){var r,i,n=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var l,h=[],c=!1,u=-1;function f(){c&&l&&(c=!1,l.length?h=l.concat(h):u=-1,h.length&&p())}function p(){if(!c){var t=a(f);c=!0;for(var e=h.length;e;){for(l=h,h=[];++u<e;)l&&l[u].run();u=-1,e=h.length}l=null,c=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function m(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];h.push(new d(t,e)),1!==h.length||c||a(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=m,n.addListener=m,n.once=m,n.off=m,n.removeListener=m,n.removeAllListeners=m,n.emit=m,n.prependListener=m,n.prependOnceListener=m,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},function(t,e,r){"use strict";t.exports={matchST_LOOKING_FOR_PROPERTY:function(){var t=this.input();if("-"===t){if(">"===(t=this.input()))return this.tok.T_OBJECT_OPERATOR;t&&this.unput(1)}else{if(this.is_WHITESPACE())return this.tok.T_WHITESPACE;if(this.is_LABEL_START())return this.consume_LABEL(),this.popState(),this.tok.T_STRING}return this.popState(),t&&this.unput(1),!1},matchST_LOOKING_FOR_VARNAME:function(){var t=this.input();if(this.popState(),this.begin("ST_IN_SCRIPTING"),this.is_LABEL_START()){if(this.consume_LABEL(),"["===(t=this.input())||"}"===t)return this.unput(1),this.tok.T_STRING_VARNAME;this.unput(this.yytext.length)}else t&&this.unput(1);return!1},matchST_VAR_OFFSET:function(){var t=this.input();if(this.is_NUM())return this.consume_NUM(),this.tok.T_NUM_STRING;if("]"===t)return this.popState(),"]";if("$"===t){if(this.input(),this.is_LABEL_START())return this.consume_LABEL(),this.tok.T_VARIABLE;throw new Error("Unexpected terminal")}if(this.is_LABEL_START())return this.consume_LABEL(),this.tok.T_STRING;if(this.is_WHITESPACE()||"\\"===t||"'"===t||"#"===t)return this.tok.T_ENCAPSED_AND_WHITESPACE;if("["===t||"{"===t||"}"===t||'"'===t||"`"===t||this.is_TOKEN())return t;throw new Error("Unexpected terminal")}}},function(t,e,r){"use strict";t.exports={matchST_IN_SCRIPTING:function(){var t=this.input();switch(t){case" ":case"\t":case"\n":case"\r":case"\r\n":return this.T_WHITESPACE();case"#":return this.T_COMMENT();case"/":return"/"===this._input[this.offset]?this.T_COMMENT():"*"===this._input[this.offset]?(this.input(),this.T_DOC_COMMENT()):this.consume_TOKEN();case"'":return this.T_CONSTANT_ENCAPSED_STRING();case'"':return this.ST_DOUBLE_QUOTES();case"`":return this.begin("ST_BACKQUOTE"),"`";case"?":if(this.aspTagMode||!this.tryMatch(">"))return this.consume_TOKEN();this.input();var e=this._input[this.offset];return"\n"!==e&&"\r"!==e||this.input(),1<this.conditionStack.length&&this.begin("INITIAL"),this.tok.T_CLOSE_TAG;case"%":return this.aspTagMode&&">"===this._input[this.offset]?(this.input(),"\n"!==(t=this._input[this.offset])&&"\r"!==t||this.input(),this.aspTagMode=!1,1<this.conditionStack.length&&this.begin("INITIAL"),this.tok.T_CLOSE_TAG):this.consume_TOKEN();case"{":return this.begin("ST_IN_SCRIPTING"),"{";case"}":return 2<this.conditionStack.length&&this.popState(),"}";default:if("."===t){if(t=this.input(),this.is_NUM())return this.consume_NUM();t&&this.unput(1)}if(this.is_NUM())return this.consume_NUM();if(this.is_LABEL_START())return this.consume_LABEL().T_STRING();if(this.is_TOKEN())return this.consume_TOKEN()}throw new Error('Bad terminal sequence "'+t+'" at line '+this.yylineno+" (offset "+this.offset+")")},T_WHITESPACE:function(){for(;this.offset<this.size;){var t=this.input();if(" "!==t&&"\t"!==t&&"\n"!==t&&"\r"!==t){t&&this.unput(1);break}}return this.tok.T_WHITESPACE}}},function(t,e,r){"use strict";t.exports={T_CONSTANT_ENCAPSED_STRING:function(){for(var t;this.offset<this.size;)if("\\"==(t=this.input()))this.input();else if("'"==t)break;return this.tok.T_CONSTANT_ENCAPSED_STRING},is_HEREDOC:function(){var t=this.offset;if("<"===this._input[this.offset-1]&&"<"===this._input[this.offset]&&"<"===this._input[this.offset+1]){if(this.offset+=3,this.is_TABSPACE())for(;this.offset<this.size&&(this.offset++,this.is_TABSPACE()););var e=this._input[this.offset-1];if("'"===e||'"'===e?this.offset++:e=null,this.is_LABEL_START()){for(var r=this.offset-1;this.offset<this.size&&(this.offset++,this.is_LABEL()););var i=this._input.substring(r,this.offset-1);if((!e||e===this._input[this.offset-1])&&(e&&this.offset++,"\r"===this._input[this.offset-1]||"\n"===this._input[this.offset-1]))return this.heredoc_label=i,r=this.offset-t,this.offset=t,this.consume(r),"'"===e?this.begin("ST_NOWDOC"):this.begin("ST_HEREDOC"),this.tok.T_START_HEREDOC}}return this.offset=t,!1},ST_DOUBLE_QUOTES:function(){for(var t;this.offset<this.size;)if("\\"==(t=this.input()))this.input();else{if('"'==t)break;if("$"==t){if("{"==(t=this.input())||this.is_LABEL_START()){this.unput(2);break}t&&this.unput(1)}else if("{"==t){if("$"==(t=this.input())){this.unput(2);break}t&&this.unput(1)}}if('"'==t)return this.tok.T_CONSTANT_ENCAPSED_STRING;var e=1;return"b"!==this.yytext[0]&&"B"!==this.yytext[0]||(e=2),2<this.yytext.length&&this.appendToken(this.tok.T_ENCAPSED_AND_WHITESPACE,this.yytext.length-e),this.unput(this.yytext.length-e),this.begin("ST_DOUBLE_QUOTES"),this.yytext},isDOC_MATCH:function(){if(this._input.substring(this.offset-1,this.offset-1+this.heredoc_label.length)===this.heredoc_label){var t=this._input[this.offset-1+this.heredoc_label.length];if("\n"===t||"\r"===t||";"===t)return!0}return!1},matchST_NOWDOC:function(){if(this.isDOC_MATCH())return this.consume(this.heredoc_label.length),this.popState(),this.tok.T_END_HEREDOC;for(var t=this._input[this.offset-1];this.offset<this.size;)if("\n"===t||"\r"===t){if(t=this.input(),this.isDOC_MATCH())return this.unput(1).popState(),this.appendToken(this.tok.T_END_HEREDOC,this.heredoc_label.length),this.tok.T_ENCAPSED_AND_WHITESPACE}else t=this.input();return this.tok.T_ENCAPSED_AND_WHITESPACE},matchST_HEREDOC:function(){var t=this.input();if(this.isDOC_MATCH())return this.consume(this.heredoc_label.length-1),this.popState(),this.tok.T_END_HEREDOC;for(;this.offset<this.size;)if("\\"===t&&"\n"!==(t=this.input())&&"\r"!==t&&(t=this.input()),"\n"===t||"\r"===t){if(t=this.input(),this.isDOC_MATCH())return this.unput(1).popState(),this.appendToken(this.tok.T_END_HEREDOC,this.heredoc_label.length),this.tok.T_ENCAPSED_AND_WHITESPACE}else if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),2<this.yytext.length?(this.appendToken(this.tok.T_DOLLAR_OPEN_CURLY_BRACES,2),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START()){var e=this.offset,r=this.consume_VARIABLE();return this.yytext.length>this.offset-e+2?(this.appendToken(r,this.offset-e+2),this.unput(this.offset-e+2),this.tok.T_ENCAPSED_AND_WHITESPACE):r}}else if("{"===t){if("$"===(t=this.input()))return this.begin("ST_IN_SCRIPTING"),2<this.yytext.length?(this.appendToken(this.tok.T_CURLY_OPEN,1),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):(this.unput(1),this.tok.T_CURLY_OPEN)}else t=this.input();return this.tok.T_ENCAPSED_AND_WHITESPACE},consume_VARIABLE:function(){this.consume_LABEL();var t=this.input();if("["==t)return this.unput(1),this.begin("ST_VAR_OFFSET"),this.tok.T_VARIABLE;if("-"===t){if(">"===this.input())return this.input(),this.is_LABEL_START()&&this.begin("ST_LOOKING_FOR_PROPERTY"),this.unput(3),this.tok.T_VARIABLE;this.unput(2)}else t&&this.unput(1);return this.tok.T_VARIABLE},matchST_BACKQUOTE:function(){var t=this.input();if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START())return this.consume_VARIABLE()}else if("{"===t){if("$"===this._input[this.offset])return this.begin("ST_IN_SCRIPTING"),this.tok.T_CURLY_OPEN}else if("`"===t)return this.popState(),"`";for(;this.offset<this.size;){if("\\"===t)this.input();else{if("`"===t){this.unput(1),this.popState(),this.appendToken("`",1);break}if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),2<this.yytext.length?(this.appendToken(this.tok.T_DOLLAR_OPEN_CURLY_BRACES,2),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START()){var e=this.offset,r=this.consume_VARIABLE();return this.yytext.length>this.offset-e+2?(this.appendToken(r,this.offset-e+2),this.unput(this.offset-e+2),this.tok.T_ENCAPSED_AND_WHITESPACE):r}continue}if("{"===t){if("$"===(t=this.input()))return this.begin("ST_IN_SCRIPTING"),2<this.yytext.length?(this.appendToken(this.tok.T_CURLY_OPEN,1),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):(this.unput(1),this.tok.T_CURLY_OPEN);continue}}t=this.input()}return this.tok.T_ENCAPSED_AND_WHITESPACE},matchST_DOUBLE_QUOTES:function(){var t=this.input();if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START())return this.consume_VARIABLE()}else if("{"===t){if("$"===this._input[this.offset])return this.begin("ST_IN_SCRIPTING"),this.tok.T_CURLY_OPEN}else if('"'===t)return this.popState(),'"';for(;this.offset<this.size;){if("\\"===t)this.input();else{if('"'===t){this.unput(1),this.popState(),this.appendToken('"',1);break}if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),2<this.yytext.length?(this.appendToken(this.tok.T_DOLLAR_OPEN_CURLY_BRACES,2),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START()){var e=this.offset,r=this.consume_VARIABLE();return this.yytext.length>this.offset-e+2?(this.appendToken(r,this.offset-e+2),this.unput(this.offset-e+2),this.tok.T_ENCAPSED_AND_WHITESPACE):r}t&&this.unput(1)}else if("{"===t){if("$"===(t=this.input()))return this.begin("ST_IN_SCRIPTING"),2<this.yytext.length?(this.appendToken(this.tok.T_CURLY_OPEN,1),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):(this.unput(1),this.tok.T_CURLY_OPEN);t&&this.unput(1)}}t=this.input()}return this.tok.T_ENCAPSED_AND_WHITESPACE}}},function(t,e,r){"use strict";t.exports={T_STRING:function(){var t=this.yytext.toLowerCase(),e=this.keywords[t];if("number"!=typeof e)if("yield"===t)e=this.php7&&this.tryMatch(" from")?(this.consume(5),this.tok.T_YIELD_FROM):this.tok.T_YIELD;else if(e=this.tok.T_STRING,"b"===t||"B"===t){var r=this.input(1);if('"'===r)return this.ST_DOUBLE_QUOTES();if("'"===r)return this.T_CONSTANT_ENCAPSED_STRING();r&&this.unput(1)}return e},consume_TOKEN:function(){var t=this._input[this.offset-1],e=this.tokenTerminals[t];return e?e.apply(this,[]):this.yytext},tokenTerminals:{$:function(){return this.offset++,this.is_LABEL_START()?(this.offset--,this.consume_LABEL(),this.tok.T_VARIABLE):(this.offset--,"$")},"-":function(){var t=this._input[this.offset];return">"===t?(this.begin("ST_LOOKING_FOR_PROPERTY").input(),this.tok.T_OBJECT_OPERATOR):"-"===t?(this.input(),this.tok.T_DEC):"="===t?(this.input(),this.tok.T_MINUS_EQUAL):"-"},"\\":function(){return this.tok.T_NS_SEPARATOR},"/":function(){return"="===this._input[this.offset]?(this.input(),this.tok.T_DIV_EQUAL):"/"},":":function(){return":"===this._input[this.offset]?(this.input(),this.tok.T_DOUBLE_COLON):":"},"(":function(){var t=this.offset;if(this.input(),this.is_TABSPACE()&&this.consume_TABSPACE().input(),this.is_LABEL_START()){var e=this.yytext.length;this.consume_LABEL();var r=this.yytext.substring(e-1).toLowerCase(),i=this.castKeywords[r];if("number"==typeof i&&(this.input(),this.is_TABSPACE()&&this.consume_TABSPACE().input(),")"===this._input[this.offset-1]))return i}return this.unput(this.offset-t),"("},"=":function(){var t=this._input[this.offset];return">"===t?(this.input(),this.tok.T_DOUBLE_ARROW):"="===t?"="===this._input[this.offset+1]?(this.consume(2),this.tok.T_IS_IDENTICAL):(this.input(),this.tok.T_IS_EQUAL):"="},"+":function(){var t=this._input[this.offset];return"+"===t?(this.input(),this.tok.T_INC):"="===t?(this.input(),this.tok.T_PLUS_EQUAL):"+"},"!":function(){return"="===this._input[this.offset]?"="===this._input[this.offset+1]?(this.consume(2),this.tok.T_IS_NOT_IDENTICAL):(this.input(),this.tok.T_IS_NOT_EQUAL):"!"},"?":function(){return this.php7&&"?"===this._input[this.offset]?(this.input(),this.tok.T_COALESCE):"?"},"<":function(){var t=this._input[this.offset];return"<"===t?"="===(t=this._input[this.offset+1])?(this.consume(2),this.tok.T_SL_EQUAL):"<"===t&&this.is_HEREDOC()?this.tok.T_START_HEREDOC:(this.input(),this.tok.T_SL):"="===t?(this.input(),this.php7&&">"===this._input[this.offset]?(this.input(),this.tok.T_SPACESHIP):this.tok.T_IS_SMALLER_OR_EQUAL):">"===t?(this.input(),this.tok.T_IS_NOT_EQUAL):"<"},">":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_IS_GREATER_OR_EQUAL):">"===t?"="===(t=this._input[this.offset+1])?(this.consume(2),this.tok.T_SR_EQUAL):(this.input(),this.tok.T_SR):">"},"*":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_MUL_EQUAL):"*"===t?(this.input(),"="===this._input[this.offset]?(this.input(),this.tok.T_POW_EQUAL):this.tok.T_POW):"*"},".":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_CONCAT_EQUAL):"."===t&&"."===this._input[this.offset+1]?(this.consume(2),this.tok.T_ELLIPSIS):"."},"%":function(){return"="===this._input[this.offset]?(this.input(),this.tok.T_MOD_EQUAL):"%"},"&":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_AND_EQUAL):"&"===t?(this.input(),this.tok.T_BOOLEAN_AND):"&"},"|":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_OR_EQUAL):"|"===t?(this.input(),this.tok.T_BOOLEAN_OR):"|"},"^":function(){return"="===this._input[this.offset]?(this.input(),this.tok.T_XOR_EQUAL):"^"}}}},function(t,e,r){"use strict";t.exports={is_NUM:function(){var t=this._input.charCodeAt(this.offset-1);return 47<t&&t<58},is_LABEL:function(){var t=this._input.charCodeAt(this.offset-1);return 96<t&&t<123||64<t&&t<91||95===t||47<t&&t<58||126<t},is_LABEL_START:function(){var t=this._input.charCodeAt(this.offset-1);return 96<t&&t<123||64<t&&t<91||95===t||126<t},consume_LABEL:function(){for(;this.offset<this.size;){var t=this.input();if(!this.is_LABEL()){t&&this.unput(1);break}}return this},is_TOKEN:function(){var t=this._input[this.offset-1];return-1!==";:,.\\[]()|^&+-/*=%!~$<>?@".indexOf(t)},is_WHITESPACE:function(){var t=this._input[this.offset-1];return" "===t||"\t"===t||"\n"===t||"\r"===t},is_TABSPACE:function(){var t=this._input[this.offset-1];return" "===t||"\t"===t},consume_TABSPACE:function(){for(;this.offset<this.size;){var t=this.input();if(!this.is_TABSPACE()){t&&this.unput(1);break}}return this},is_HEX:function(){var t=this._input.charCodeAt(this.offset-1);return 47<t&&t<58||64<t&&t<71||96<t&&t<103}}},function(t,e,r){"use strict";function o(t){return"."!=t&&","!=t&&!isNaN(parseFloat(t))&&isFinite(t)}function i(t,e){function r(t){return[t,null]}this.lexer=t,this.ast=e,this.tok=t.tok,this.EOF=t.EOF,this.token=null,this.prev=null,this.debug=!1,this.php7=!0,this.php74=!0,this.extractDoc=!1,this.extractTokens=!1,this.suppressErrors=!1,this.entries={IDENTIFIER:new Map([this.tok.T_ABSTRACT,this.tok.T_ARRAY,this.tok.T_AS,this.tok.T_BREAK,this.tok.T_CALLABLE,this.tok.T_CASE,this.tok.T_CATCH,this.tok.T_CLASS,this.tok.T_CLASS_C,this.tok.T_CLONE,this.tok.T_CONST,this.tok.T_CONTINUE,this.tok.T_DECLARE,this.tok.T_DEFAULT,this.tok.T_DIR,this.tok.T_DO,this.tok.T_ECHO,this.tok.T_ELSE,this.tok.T_ELSEIF,this.tok.T_EMPTY,this.tok.T_ENDDECLARE,this.tok.T_ENDFOR,this.tok.T_ENDFOREACH,this.tok.T_ENDIF,this.tok.T_ENDSWITCH,this.tok.T_ENDWHILE,this.tok.T_EVAL,this.tok.T_EXIT,this.tok.T_EXTENDS,this.tok.T_FILE,this.tok.T_FINAL,this.tok.T_FINALLY,this.tok.T_FUNC_C,this.tok.T_FOR,this.tok.T_FOREACH,this.tok.T_FUNCTION,this.tok.T_GLOBAL,this.tok.T_GOTO,this.tok.T_IF,this.tok.T_IMPLEMENTS,this.tok.T_INCLUDE,this.tok.T_INCLUDE_ONCE,this.tok.T_INSTANCEOF,this.tok.T_INSTEADOF,this.tok.T_INTERFACE,this.tok.T_ISSET,this.tok.T_LINE,this.tok.T_LIST,this.tok.T_LOGICAL_AND,this.tok.T_LOGICAL_OR,this.tok.T_LOGICAL_XOR,this.tok.T_METHOD_C,this.tok.T_NAMESPACE,this.tok.T_NEW,this.tok.T_NS_C,this.tok.T_PRINT,this.tok.T_PRIVATE,this.tok.T_PROTECTED,this.tok.T_PUBLIC,this.tok.T_REQUIRE,this.tok.T_REQUIRE_ONCE,this.tok.T_RETURN,this.tok.T_STATIC,this.tok.T_SWITCH,this.tok.T_THROW,this.tok.T_TRAIT,this.tok.T_TRY,this.tok.T_UNSET,this.tok.T_USE,this.tok.T_VAR,this.tok.T_WHILE,this.tok.T_YIELD].map(r)),VARIABLE:new Map([this.tok.T_VARIABLE,"$","&",this.tok.T_NS_SEPARATOR,this.tok.T_STRING,this.tok.T_NAMESPACE,this.tok.T_STATIC].map(r)),SCALAR:new Map([this.tok.T_CONSTANT_ENCAPSED_STRING,this.tok.T_START_HEREDOC,this.tok.T_LNUMBER,this.tok.T_DNUMBER,this.tok.T_ARRAY,"[",this.tok.T_CLASS_C,this.tok.T_TRAIT_C,this.tok.T_FUNC_C,this.tok.T_METHOD_C,this.tok.T_LINE,this.tok.T_FILE,this.tok.T_DIR,this.tok.T_NS_C,'"','b"','B"',"-",this.tok.T_NS_SEPARATOR].map(r)),T_MAGIC_CONST:new Map([this.tok.T_CLASS_C,this.tok.T_TRAIT_C,this.tok.T_FUNC_C,this.tok.T_METHOD_C,this.tok.T_LINE,this.tok.T_FILE,this.tok.T_DIR,this.tok.T_NS_C].map(r)),T_MEMBER_FLAGS:new Map([this.tok.T_PUBLIC,this.tok.T_PRIVATE,this.tok.T_PROTECTED,this.tok.T_STATIC,this.tok.T_ABSTRACT,this.tok.T_FINAL].map(r)),EOS:new Map([";",this.EOF,this.tok.T_INLINE_HTML].map(r)),EXPR:new Map(["@","-","+","!","~","(","`",this.tok.T_LIST,this.tok.T_CLONE,this.tok.T_INC,this.tok.T_DEC,this.tok.T_NEW,this.tok.T_ISSET,this.tok.T_EMPTY,this.tok.T_INCLUDE,this.tok.T_INCLUDE_ONCE,this.tok.T_REQUIRE,this.tok.T_REQUIRE_ONCE,this.tok.T_EVAL,this.tok.T_INT_CAST,this.tok.T_DOUBLE_CAST,this.tok.T_STRING_CAST,this.tok.T_ARRAY_CAST,this.tok.T_OBJECT_CAST,this.tok.T_BOOL_CAST,this.tok.T_UNSET_CAST,this.tok.T_EXIT,this.tok.T_PRINT,this.tok.T_YIELD,this.tok.T_STATIC,this.tok.T_FUNCTION,this.tok.T_VARIABLE,"$",this.tok.T_NS_SEPARATOR,this.tok.T_STRING,this.tok.T_STRING,this.tok.T_CONSTANT_ENCAPSED_STRING,this.tok.T_START_HEREDOC,this.tok.T_LNUMBER,this.tok.T_DNUMBER,this.tok.T_ARRAY,"[",this.tok.T_CLASS_C,this.tok.T_TRAIT_C,this.tok.T_FUNC_C,this.tok.T_METHOD_C,this.tok.T_LINE,this.tok.T_FILE,this.tok.T_DIR,this.tok.T_NS_C].map(r))}}i.prototype.getTokenName=function(t){return o(t)?t==this.EOF?"the end of file (EOF)":this.lexer.engine.tokens.values[t]:"'"+t+"'"},i.prototype.parse=function(t,e){this._errors=[],this.filename=e||"eval",this.currentNamespace=[""],this.extractDoc?this._docs=[]:this._docs=null,this.extractTokens?this._tokens=[]:this._tokens=null,this.php7||(this.php74=!1),this._docIndex=0,this._lastNode=null,this.lexer.setInput(t),this.lexer.all_tokens=this.extractTokens,this.lexer.comment_tokens=this.extractDoc,this.length=this.lexer._input.length,this.innerList=!1,this.innerListForm=!1;var r=this.node("program"),i=[];for(this.next();this.token!=this.EOF;){var n=this.read_start();null!=n&&(Array.isArray(n)?i=i.concat(n):i.push(n))}this.prev=[this.lexer.yylloc.last_line,this.lexer.yylloc.last_column,this.lexer.offset];var o=r(i,this._errors,this._docs,this._tokens);if(this.debug){var s=this.ast.checkNodes();if(0<s.length)throw s.forEach(function(t){t.position&&console.log("Node at line "+t.position.line+", column "+t.position.column),console.log(t.stack.join("\n"))}),new Error("Some nodes are not closed")}return o},i.prototype.raiseError=function(t,e,r,i){if(t+=" on line "+this.lexer.yylloc.first_line,!this.suppressErrors){var n=new SyntaxError(t,this.filename,this.lexer.yylloc.first_line);throw n.lineNumber=this.lexer.yylloc.first_line,n.fileName=this.filename,n.columnNumber=this.lexer.yylloc.first_column,n}var o=this.ast.prepare("error",null,this)(t,i,this.lexer.yylloc.first_line,r);return this._errors.push(o),o},i.prototype.error=function(t){var e="Parse Error : syntax error",r=this.getTokenName(this.token),i="";if(this.token!==this.EOF){if(o(this.token)){var n=this.text();10<n.length&&(n=n.substring(0,7)+"..."),r="'"+n+"' ("+r+")"}e+=", unexpected "+r}return t&&!Array.isArray(t)&&(!o(t)&&1!==t.length||(i=", expecting "+this.getTokenName(t)),e+=i),this.raiseError(e,i,t,r)},i.prototype.node=function(t){if(this.extractDoc){var e=null;this._docIndex<this._docs.length&&(e=this._docs.slice(this._docIndex),this._docIndex=this._docs.length,this.debug&&(console.log(new Error("Append docs on "+t)),console.log(e)));var r=this.ast.prepare(t,e,this);return r.postBuild=function(t){if(this._docIndex<this._docs.length)if(this._lastNode){for(var e=this.prev[2],r=this._docIndex;r<this._docs.length&&!(this._docs[r].offset>e);r++);r>this._docIndex&&(this._lastNode.setTrailingComments(this._docs.slice(this._docIndex,r)),this._docIndex=r)}else this.token===this.EOF&&(t.setTrailingComments(this._docs.slice(this._docIndex)),this._docIndex=this._docs.length);this._lastNode=t}.bind(this),r}return this.ast.prepare(t,null,this)},i.prototype.expectEndOfStatement=function(t){if(";"===this.token)t&&";"===this.lexer.yytext&&t.includeToken(this);else if(this.token!==this.tok.T_INLINE_HTML&&this.token!==this.EOF)return this.error(";"),!1;return this.next(),!0};var s=["parser.next","parser.node","parser.showlog"];i.prototype.showlog=function(){for(var t,e=(new Error).stack.split("\n"),r=2;r<e.length;r++){t=e[r].trim();for(var i=!1,n=0;n<s.length;n++)if(t.substring(3,3+s[n].length)===s[n]){i=!0;break}if(!i)break}return console.log("Line "+this.lexer.yylloc.first_line+" : "+this.getTokenName(this.token)+">"+this.lexer.yytext+"< @--\x3e"+t),this},i.prototype.expect=function(t){if(Array.isArray(t)){if(-1===t.indexOf(this.token))return this.error(t),!1}else if(this.token!=t)return this.error(t),!1;return!0},i.prototype.text=function(){return this.lexer.yytext},i.prototype.next=function(){if(";"===this.token&&";"!==this.lexer.yytext||(this.prev=[this.lexer.yylloc.last_line,this.lexer.yylloc.last_column,this.lexer.offset]),this.lex(),this.debug&&this.showlog(),this.extractDoc)for(;this.token===this.tok.T_COMMENT||this.token===this.tok.T_DOC_COMMENT;)this.token===this.tok.T_COMMENT?this._docs.push(this.read_comment()):this._docs.push(this.read_doc_comment());return this},i.prototype.lex=function(){if(this.extractTokens)do{if(this.token=this.lexer.lex()||this.EOF,this.token===this.EOF)return this;var t=this.lexer.yytext;if(t=this.lexer.engine.tokens.values.hasOwnProperty(this.token)?[this.lexer.engine.tokens.values[this.token],t,this.lexer.yylloc.first_line,this.lexer.yylloc.first_offset,this.lexer.offset]:[null,t,this.lexer.yylloc.first_line,this.lexer.yylloc.first_offset,this.lexer.offset],this._tokens.push(t),this.token===this.tok.T_CLOSE_TAG)return this.token=";",this;if(this.token===this.tok.T_OPEN_TAG_WITH_ECHO)return this.token=this.tok.T_ECHO,this}while(this.token===this.tok.T_WHITESPACE||!this.extractDoc&&(this.token===this.tok.T_COMMENT||this.token===this.tok.T_DOC_COMMENT)||this.token===this.tok.T_OPEN_TAG);else this.token=this.lexer.lex()||this.EOF;return this},i.prototype.is=function(t){return Array.isArray(t)?-1!==t.indexOf(this.token):this.entries[t].has(this.token)},[r(29),r(30),r(31),r(32),r(33),r(34),r(35),r(36),r(37),r(38),r(39),r(40),r(41),r(42),r(43)].forEach(function(t){for(var e in t){if(i.prototype.hasOwnProperty(e))throw new Error("Function "+e+" is already defined - collision");i.prototype[e]=t[e]}}),t.exports=i},function(t,e,r){"use strict";t.exports={read_array:function(){var t=null,e=!1,r=this.node("array");t=this.token===this.tok.T_ARRAY?(this.next().expect("("),")"):(e=!0,"]");var i=[];return this.next().token!==t&&(i=this.read_array_pair_list(e)),this.expect(t),this.next(),r(e,i)},read_array_pair_list:function(t){var e=this;return this.read_list(function(){return e.read_array_pair(t)},",",!0)},read_array_pair:function(t){if(","===this.token||!t&&")"===this.token||t&&"]"===this.token)return this.node("noop")();if("&"===this.token)return this.next().read_variable(!0,!1,!0);var e=this.node("entry"),r=this.read_expr();return this.token===this.tok.T_DOUBLE_ARROW?"&"===this.next().token?e(r,this.next().read_variable(!0,!1,!0)):e(r,this.read_expr()):(e.destroy(),r)}}},function(t,e,r){"use strict";t.exports={read_class:function(){var t=this.node("class"),e=this.read_class_scope();if(this.token!==this.tok.T_CLASS)return this.error(this.tok.T_CLASS),this.next(),null;this.next().expect(this.tok.T_STRING);var r=this.node("identifier"),i=this.text();this.next(),r=r(i);var n=null;this.token==this.tok.T_EXTENDS&&(n=this.next().read_namespace_name());var o=null;return this.token==this.tok.T_IMPLEMENTS&&(o=this.next().read_name_list()),this.expect("{"),t(r,n,o,this.next().read_class_body(),e)},read_class_scope:function(){var t=this.token;return t==this.tok.T_FINAL?(this.next(),[0,0,2]):t==this.tok.T_ABSTRACT?(this.next(),[0,0,1]):[0,0,0]},read_class_body:function(){for(var t=[];this.token!==this.EOF&&"}"!==this.token;)if(this.token!==this.tok.T_COMMENT)if(this.token!==this.tok.T_DOC_COMMENT)if(this.token!==this.tok.T_USE){var e=this.read_member_flags(!1);if(this.token!==this.tok.T_CONST)if(this.token===this.tok.T_VAR&&(this.next().expect(this.tok.T_VARIABLE),e[0]=null,e[1]=0),this.token===this.tok.T_VARIABLE){var r=this.read_variable_list(e);this.expect(";"),this.next(),t=t.concat(r)}else this.token===this.tok.T_FUNCTION?t.push(this.read_function(!1,e)):(this.error([this.tok.T_CONST,this.tok.T_VARIABLE,this.tok.T_FUNCTION]),this.next());else{var i=this.read_constant_list(e);this.expect(";")&&this.next(),t=t.concat(i)}}else t=t.concat(this.read_trait_use_statement());else t.push(this.read_doc_comment());else t.push(this.read_comment());return this.expect("}"),this.next(),t},read_variable_list:function(t){return this.node("propertystatement")(null,this.read_list(function(){var t=this.node("property");this.expect(this.tok.T_VARIABLE);var e=this.node("identifier"),r=this.text().substring(1);return this.next(),e=e(r),";"===this.token||","===this.token?t(e,null):"="===this.token?t(e,this.next().read_expr()):(this.expect([",",";","="]),t(e,null))},","),t)},read_constant_list:function(t){return this.expect(this.tok.T_CONST)&&this.next(),this.node("classconstant")(null,this.read_list(function(){var t=this.node("constant"),e=null,r=null;if(this.token===this.tok.T_STRING||this.php7&&this.is("IDENTIFIER")){e=this.node("identifier");var i=this.text();this.next(),e=e(i)}else this.expect("IDENTIFIER");return this.expect("=")&&(r=this.next().read_expr()),t(e,r)},","),t)},read_member_flags:function(t){var e=[-1,-1,-1];if(this.is("T_MEMBER_FLAGS")){var r=0,i=0;do{switch(this.token){case this.tok.T_PUBLIC:i=r=0;break;case this.tok.T_PROTECTED:r=0,i=1;break;case this.tok.T_PRIVATE:r=0,i=2;break;case this.tok.T_STATIC:i=r=1;break;case this.tok.T_ABSTRACT:r=2,i=1;break;case this.tok.T_FINAL:i=r=2}t&&(0==r&&2==i?(this.expect([this.tok.T_PUBLIC,this.tok.T_PROTECTED]),i=-1):2==r&&1==i&&(this.error(),i=-1)),-1!==e[r]?this.error():-1!==i&&(e[r]=i)}while(this.next().is("T_MEMBER_FLAGS"))}return-1==e[1]&&(e[1]=0),-1==e[2]&&(e[2]=0),e},read_interface:function(){var t=this.node("interface");if(this.token!==this.tok.T_INTERFACE)return this.error(this.tok.T_INTERFACE),this.next(),null;this.next().expect(this.tok.T_STRING);var e=this.node("identifier"),r=this.text();this.next(),e=e(r);var i=null;return this.token===this.tok.T_EXTENDS&&(i=this.next().read_name_list()),this.expect("{"),t(e,i,this.next().read_interface_body())},read_interface_body:function(){for(var t=[];this.token!==this.EOF&&"}"!==this.token;)if(this.token!==this.tok.T_COMMENT)if(this.token!==this.tok.T_DOC_COMMENT){var e=this.read_member_flags(!0);if(this.token==this.tok.T_CONST){var r=this.read_constant_list(e);this.expect(";")&&this.next(),t=t.concat(r)}else if(this.token===this.tok.T_FUNCTION){var i=this.read_function_declaration(2,e);i.parseFlags(e),t.push(i),this.expect(";")&&this.next()}else this.error([this.tok.T_CONST,this.tok.T_FUNCTION]),this.next()}else t.push(this.read_doc_comment());else t.push(this.read_comment());return this.expect("}")&&this.next(),t},read_trait:function(){var t=this.node("trait");if(this.token!==this.tok.T_TRAIT)return this.error(this.tok.T_TRAIT),this.next(),null;this.next().expect(this.tok.T_STRING);var e=this.node("identifier"),r=this.text();return this.next(),e=e(r),this.expect("{"),t(e,this.next().read_class_body())},read_trait_use_statement:function(){var t=this.node("traituse");this.expect(this.tok.T_USE)&&this.next();for(var e=[this.read_namespace_name()],r=null;","===this.token;)e.push(this.next().read_namespace_name());if("{"===this.token){for(r=[];this.next().token!==this.EOF&&"}"!==this.token;)r.push(this.read_trait_use_alias()),this.expect(";");this.expect("}")&&this.next()}else this.expect(";")&&this.next();return t(e,r)},read_trait_use_alias:function(){var t,e=this.node(),r=null;if(this.is("IDENTIFIER")){t=this.node("identifier");var i=this.text();this.next(),t=t(i)}else if(t=this.read_namespace_name(),this.token===this.tok.T_DOUBLE_COLON)if(this.next(),this.token===this.tok.T_STRING||this.php7&&this.is("IDENTIFIER")){r=t,t=this.node("identifier");var n=this.text();this.next(),t=t(n)}else this.expect(this.tok.T_STRING);else t=t.name;if(this.token===this.tok.T_INSTEADOF)return e("traitprecedence",r,t,this.next().read_name_list());if(this.token!==this.tok.T_AS)return this.expect([this.tok.T_AS,this.tok.T_INSTEADOF]),e("traitalias",r,t,null,null);var o=null,s=null;if(this.next().is("T_MEMBER_FLAGS")&&(o=this.read_member_flags()),this.token===this.tok.T_STRING||this.php7&&this.is("IDENTIFIER")){s=this.node("identifier");var a=this.text();this.next(),s=s(a)}else!1===o&&this.expect(this.tok.T_STRING);return e("traitalias",r,t,s,o)}}},function(t,e,r){"use strict";t.exports={read_comment:function(){var t=this.text(),e=this.ast.prepare("/*"===t.substring(0,2)?"commentblock":"commentline",null,this),r=this.lexer.yylloc.first_offset,i=this.prev;return this.prev=[this.lexer.yylloc.last_line,this.lexer.yylloc.last_column,this.lexer.offset],this.lex(),(e=e(t)).offset=r,this.prev=i,e},read_doc_comment:function(){var t=this.ast.prepare("commentblock",null,this),e=this.lexer.yylloc.first_offset,r=this.text(),i=this.prev;return this.prev=[this.lexer.yylloc.last_line,this.lexer.yylloc.last_column,this.lexer.offset],this.lex(),(t=t(r)).offset=e,this.prev=i,t}}},function(t,e,r){"use strict";t.exports={read_expr:function(t){var e=this.node();if(t=t||this.read_expr_item(),"|"===this.token)return e("bin","|",t,this.next().read_expr());if("&"===this.token)return e("bin","&",t,this.next().read_expr());if("^"===this.token)return e("bin","^",t,this.next().read_expr());if("."===this.token)return e("bin",".",t,this.next().read_expr());if("+"===this.token)return e("bin","+",t,this.next().read_expr());if("-"===this.token)return e("bin","-",t,this.next().read_expr());if("*"===this.token)return e("bin","*",t,this.next().read_expr());if("/"===this.token)return e("bin","/",t,this.next().read_expr());if("%"===this.token)return e("bin","%",t,this.next().read_expr());if(this.token===this.tok.T_POW)return e("bin","**",t,this.next().read_expr());if(this.token===this.tok.T_SL)return e("bin","<<",t,this.next().read_expr());if(this.token===this.tok.T_SR)return e("bin",">>",t,this.next().read_expr());if(this.token===this.tok.T_BOOLEAN_OR)return e("bin","||",t,this.next().read_expr());if(this.token===this.tok.T_LOGICAL_OR)return e("bin","or",t,this.next().read_expr());if(this.token===this.tok.T_BOOLEAN_AND)return e("bin","&&",t,this.next().read_expr());if(this.token===this.tok.T_LOGICAL_AND)return e("bin","and",t,this.next().read_expr());if(this.token===this.tok.T_LOGICAL_XOR)return e("bin","xor",t,this.next().read_expr());if(this.token===this.tok.T_IS_IDENTICAL)return e("bin","===",t,this.next().read_expr());if(this.token===this.tok.T_IS_NOT_IDENTICAL)return e("bin","!==",t,this.next().read_expr());if(this.token===this.tok.T_IS_EQUAL)return e("bin","==",t,this.next().read_expr());if(this.token===this.tok.T_IS_NOT_EQUAL)return e("bin","!=",t,this.next().read_expr());if("<"===this.token)return e("bin","<",t,this.next().read_expr());if(">"===this.token)return e("bin",">",t,this.next().read_expr());if(this.token===this.tok.T_IS_SMALLER_OR_EQUAL)return e("bin","<=",t,this.next().read_expr());if(this.token===this.tok.T_IS_GREATER_OR_EQUAL)return e("bin",">=",t,this.next().read_expr());if(this.token===this.tok.T_SPACESHIP)return e("bin","<=>",t,this.next().read_expr());if(this.token===this.tok.T_INSTANCEOF&&(t=e("bin","instanceof",t,this.next().read_class_name_reference()),";"!==this.token&&this.token!==this.tok.T_INLINE_HTML&&this.token!==this.EOF&&(t=this.read_expr(t))),this.token===this.tok.T_COALESCE)return e("bin","??",t,this.next().read_expr());if("?"!==this.token)return e.destroy(t),t;var r=null;return":"!==this.next().token&&(r=this.read_expr()),this.expect(":")&&this.next(),e("retif",t,r,this.read_expr())},read_expr_cast:function(t){return this.node("cast")(t,this.text(),this.next().read_expr())},read_expr_item:function(){var t,e;if("@"===this.token)return this.node("silent")(this.next().read_expr());if("+"===this.token)return this.node("unary")("+",this.next().read_expr());if("-"===this.token)return this.node("unary")("-",this.next().read_expr());if("!"===this.token)return this.node("unary")("!",this.next().read_expr());if("~"===this.token)return this.node("unary")("~",this.next().read_expr());if("("===this.token)return(e=this.next().read_expr()).parenthesizedExpression=!0,this.expect(")")&&this.next(),this.handleDereferencable(e);if("`"===this.token)return this.read_encapsed_string("`");if(this.token===this.tok.T_LIST){var r=null,i=this.innerList;t=this.node("list"),i||(r=this.node("assign")),this.next().expect("(")&&this.next(),this.innerList||(this.innerList=!0);var n=this.read_array_pair_list(!1);this.expect(")")&&this.next();for(var o=!1,s=0;s<n.length;s++)if(null!==n[s]&&"noop"!==n[s].kind){o=!0;break}return o||this.raiseError("Fatal Error : Cannot use empty list on line "+this.lexer.yylloc.first_line),i?t(n,!1):(this.innerList=!1,this.expect("=")?r(t(n,!1),this.next().read_expr(),"="):t(n,!1))}if(this.token===this.tok.T_CLONE)return this.node("clone")(this.next().read_expr());switch(this.token){case this.tok.T_INC:return this.node("pre")("+",this.next().read_variable(!1,!1,!1));case this.tok.T_DEC:return this.node("pre")("-",this.next().read_variable(!1,!1,!1));case this.tok.T_NEW:return this.read_new_expr();case this.tok.T_ISSET:t=this.node("isset"),this.next().expect("(")&&this.next();var a=this.read_list(this.read_expr,",");return this.expect(")")&&this.next(),t(a);case this.tok.T_EMPTY:t=this.node("empty"),this.next().expect("(")&&this.next();var l=this.read_expr();return this.expect(")")&&this.next(),t(l);case this.tok.T_INCLUDE:return this.node("include")(!1,!1,this.next().read_expr());case this.tok.T_INCLUDE_ONCE:return this.node("include")(!0,!1,this.next().read_expr());case this.tok.T_REQUIRE:return this.node("include")(!1,!0,this.next().read_expr());case this.tok.T_REQUIRE_ONCE:return this.node("include")(!0,!0,this.next().read_expr());case this.tok.T_EVAL:return t=this.node("eval"),this.next().expect("(")&&this.next(),e=this.read_expr(),this.expect(")")&&this.next(),t(e);case this.tok.T_INT_CAST:return this.read_expr_cast("int");case this.tok.T_DOUBLE_CAST:return this.read_expr_cast("float");case this.tok.T_STRING_CAST:return this.read_expr_cast(-1!==this.text().indexOf("binary")?"binary":"string");case this.tok.T_ARRAY_CAST:return this.read_expr_cast("array");case this.tok.T_OBJECT_CAST:return this.read_expr_cast("object");case this.tok.T_BOOL_CAST:return this.read_expr_cast("bool");case this.tok.T_UNSET_CAST:return this.read_expr_cast("unset");case this.tok.T_EXIT:var h="die"===this.lexer.yytext.toLowerCase();t=this.node("exit");var c=null;return"("===this.next().token&&(")"!==this.next().token?(c=this.read_expr(),this.expect(")")&&this.next()):this.next()),t(c,h);case this.tok.T_PRINT:return this.node("print")(this.next().read_expr());case this.tok.T_YIELD:var u=null,f=null;return t=this.node("yield"),this.next().is("EXPR")&&(u=this.read_expr(),this.token===this.tok.T_DOUBLE_ARROW&&(f=u,u=this.next().read_expr())),t(u,f);case this.tok.T_YIELD_FROM:return(t=this.node("yieldfrom"))(e=this.next().read_expr());case this.tok.T_FUNCTION:return this.read_function(!0);case this.tok.T_STATIC:var p=[this.token,this.lexer.getState()];if(this.next().token===this.tok.T_FUNCTION)return this.read_function(!0,[0,1,0]);this.lexer.tokens.push(p),this.next()}if(this.is("VARIABLE")){t=this.node();var d="identifier"===(e=this.read_variable(!1,!1,!1)).kind||"staticlookup"===e.kind&&"identifier"===e.offset.kind;switch(this.token){case"=":return d&&this.error("VARIABLE"),t("assign",e,"&"==this.next().token?this.next().token===this.tok.T_NEW?(this.php7&&this.error(),this.read_new_expr()):this.read_variable(!1,!1,!0):this.read_expr(),"=");case this.tok.T_PLUS_EQUAL:return d&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"+=");case this.tok.T_MINUS_EQUAL:return d&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"-=");case this.tok.T_MUL_EQUAL:return d&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"*=");case this.tok.T_POW_EQUAL:return d&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"**=");case this.tok.T_DIV_EQUAL:return d&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"/=");case this.tok.T_CONCAT_EQUAL:return d&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),".=");case this.tok.T_MOD_EQUAL:return d&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"%=");case this.tok.T_AND_EQUAL:return d&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"&=");case this.tok.T_OR_EQUAL:return d&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"|=");case this.tok.T_XOR_EQUAL:return d&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"^=");case this.tok.T_SL_EQUAL:return d&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"<<=");case this.tok.T_SR_EQUAL:return d&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),">>=");case this.tok.T_INC:return d&&this.error("VARIABLE"),this.next(),t("post","+",e);case this.tok.T_DEC:return d&&this.error("VARIABLE"),this.next(),t("post","-",e);default:t.destroy(e)}}else{if(this.is("SCALAR")){if(t=this.node(),"array"===(e=this.read_scalar()).kind&&e.shortForm&&"="===this.token){var m=this.node("list")(e.items,!0);return e.loc&&(m.loc=e.loc),t("assign",m,this.next().read_expr(),"=")}return t.destroy(e),this.handleDereferencable(e)}this.error("EXPR"),this.next()}return e},read_new_expr:function(){var t=this.node("new");this.expect(this.tok.T_NEW)&&this.next();var e=[];if(this.token===this.tok.T_CLASS){var r=this.node("class"),i=null,n=null,o=null;return"("===this.next().token&&(e=this.read_function_argument_list()),this.token==this.tok.T_EXTENDS&&(i=this.next().read_namespace_name()),this.token==this.tok.T_IMPLEMENTS&&(n=this.next().read_name_list()),this.expect("{")&&(o=this.next().read_class_body()),t(r(null,i,n,o,[0,0,0]),e)}var s=this.read_new_class_name();return"("===this.token&&(e=this.read_function_argument_list()),t(s,e)},read_new_class_name:function(){if(this.token===this.tok.T_NS_SEPARATOR||this.token===this.tok.T_STRING||this.token===this.tok.T_NAMESPACE){var t=this.read_namespace_name(!0);return this.token===this.tok.T_DOUBLE_COLON&&(t=this.read_static_getter(t)),t}if(this.is("VARIABLE"))return this.read_variable(!0,!1,!1);this.expect([this.tok.T_STRING,"VARIABLE"])},handleDereferencable:function(t){for(;this.token!==this.EOF;)if(this.token===this.tok.T_OBJECT_OPERATOR||this.token===this.tok.T_DOUBLE_COLON)t=this.recursive_variable_chain_scan(t,!1,!1,!0);else if(this.token===this.tok.T_CURLY_OPEN||"["===this.token)t=this.read_dereferencable(t);else{if("("!==this.token)return t;t=this.node("call")(t,this.read_function_argument_list())}return t}}},function(t,e,r){"use strict";t.exports={is_reference:function(){return"&"==this.token&&(this.next(),!0)},is_variadic:function(){return this.token===this.tok.T_ELLIPSIS&&(this.next(),!0)},read_function:function(t,e){var r=this.read_function_declaration(t?1:e?2:0,e&&1===e[1]);return e&&1==e[2]?(r.parseFlags(e),this.expect(";")&&this.next()):(this.expect("{")&&(r.body=this.read_code_block(!1),r.loc&&r.body.loc&&(r.loc.end=r.body.loc.end)),!t&&e&&r.parseFlags(e)),r},read_function_declaration:function(t,e){var r="function";1===t?r="closure":2===t&&(r="method");var i=this.node(r);this.expect(this.tok.T_FUNCTION)&&this.next();var n=this.is_reference(),o=!1,s=[],a=null,l=!1;if(1!==t){var h=this.node("identifier");2===t?this.php7?this.token===this.tok.T_STRING||this.is("IDENTIFIER")?(o=this.text(),this.next()):this.php74||this.error("IDENTIFIER"):this.token===this.tok.T_STRING?(o=this.text(),this.next()):this.error("IDENTIFIER"):this.php7?this.token===this.tok.T_STRING?(o=this.text(),this.next()):this.php74?this.expect("(")||this.next():(this.error(this.tok.T_STRING),this.next()):(this.expect(this.tok.T_STRING)&&(o=this.text()),this.next()),o=h(o)}this.expect("(")&&this.next();var c=this.read_parameter_list();return this.expect(")")&&this.next(),1===t&&this.token===this.tok.T_USE&&(this.next().expect("(")&&this.next(),s=this.read_list(this.read_lexical_var,","),this.expect(")")&&this.next()),":"===this.token&&("?"===this.next().token&&(l=!0,this.next()),a=this.read_type()),1===t?i(c,n,s,a,l,e):i(o,c,n,a,l)},read_lexical_var:function(){var t=this.node("variable"),e=!1;"&"===this.token&&(e=!0,this.next()),this.expect(this.tok.T_VARIABLE);var r=this.text().substring(1);return this.next(),t(r,e,!1)},read_parameter_list:function(){var t=[];if(")"!=this.token)for(;this.token!=this.EOF;){if(t.push(this.read_parameter()),","!=this.token){if(")"==this.token)break;this.error([",",")"]);break}this.next()}return t},read_parameter:function(){var t,e=this.node("parameter"),r=null,i=null,n=!1;"?"===this.token&&(this.next(),n=!0),t=this.read_type(),n&&!t&&this.raiseError("Expecting a type definition combined with nullable operator");var o=this.is_reference(),s=this.is_variadic();if(this.expect(this.tok.T_VARIABLE)){r=this.node("identifier");var a=this.text().substring(1);this.next(),r=r(a)}return"="==this.token&&(i=this.next().read_expr()),e(r,t,i,o,s,n)},read_function_argument_list:function(){var t=[],e=!1;if(this.expect("(")&&this.next(),")"!==this.token)for(;this.token!=this.EOF;){var r=this.read_argument_list();if(r&&(t.push(r),"variadic"===r.kind?e=!0:e&&this.raiseError("Unexpected argument after a variadic argument")),","!==this.token)break;this.next()}return this.expect(")")&&this.next(),t},read_argument_list:function(){return this.token===this.tok.T_ELLIPSIS?this.node("variadic")(this.next().read_expr()):this.read_expr()},read_type:function(){var t=this.node();if(this.token===this.tok.T_ARRAY||this.token===this.tok.T_CALLABLE){var e=this.text();return this.next(),t("typereference",e.toLowerCase(),e)}if(this.token!==this.tok.T_STRING)return this.token===this.tok.T_NAMESPACE||this.token===this.tok.T_NS_SEPARATOR?this.read_namespace_name():null;var r=this.text(),i=[this.token,this.lexer.getState()];return this.next(),this.token!==this.tok.T_NS_SEPARATOR&&-1<this.ast.typereference.types.indexOf(r.toLowerCase())?t("typereference",r.toLowerCase(),r):(this.lexer.tokens.push(i),this.next(),this.read_namespace_name())}}},function(t,e,r){"use strict";t.exports={read_if:function(){var t,e=this.node("if"),r=null,i=null,n=!1;if(t=this.next().read_if_expr(),":"===this.token){n=!0,this.next(),r=this.node("block");for(var o=[];this.token!==this.EOF&&this.token!==this.tok.T_ENDIF;){if(this.token===this.tok.T_ELSEIF){i=this.read_elseif_short();break}if(this.token===this.tok.T_ELSE){i=this.read_else_short();break}o.push(this.read_inner_statement())}r=r(null,o),this.expect(this.tok.T_ENDIF)&&this.next(),this.expectEndOfStatement()}else r=this.read_statement(),this.token===this.tok.T_ELSEIF?i=this.read_if():this.token===this.tok.T_ELSE&&(i=this.next().read_statement());return e(t,r,i,n)},read_if_expr:function(){this.expect("(")&&this.next();var t=this.read_expr();return this.expect(")")&&this.next(),t},read_elseif_short:function(){var t,e=this.node("if"),r=null,i=null,n=[];for(t=this.next().read_if_expr(),this.expect(":")&&this.next(),i=this.node("block");this.token!=this.EOF&&this.token!==this.tok.T_ENDIF;){if(this.token===this.tok.T_ELSEIF){r=this.read_elseif_short();break}if(this.token===this.tok.T_ELSE){r=this.read_else_short();break}n.push(this.read_inner_statement())}return e(t,i=i(null,n),r,!0)},read_else_short:function(){var t=this.node("block");this.next().expect(":")&&this.next();for(var e=[];this.token!=this.EOF&&this.token!==this.tok.T_ENDIF;)e.push(this.read_inner_statement());return t(null,e)}}},function(t,e,r){"use strict";t.exports={read_while:function(){var t=this.node("while");this.expect(this.tok.T_WHILE)&&this.next();var e,r=!1;return this.expect("(")&&this.next(),e=this.read_expr(),this.expect(")")&&this.next(),t(e,":"===this.token?(r=!0,this.read_short_form(this.tok.T_ENDWHILE)):this.read_statement(),r)},read_do:function(){var t=this.node("do");this.expect(this.tok.T_DO)&&this.next();var e,r=null;return e=this.read_statement(),this.expect(this.tok.T_WHILE)&&(this.next().expect("(")&&this.next(),r=this.read_expr(),this.expect(")")&&this.next(),this.expect(";")&&this.next()),t(r,e)},read_for:function(){var t=this.node("for");this.expect(this.tok.T_FOR)&&this.next();var e=[],r=[],i=[],n=!1;return this.expect("(")&&this.next(),";"!==this.token?(e=this.read_list(this.read_expr,","),this.expect(";")&&this.next()):this.next(),";"!==this.token?(r=this.read_list(this.read_expr,","),this.expect(";")&&this.next()):this.next(),")"!==this.token?(i=this.read_list(this.read_expr,","),this.expect(")")&&this.next()):this.next(),t(e,r,i,":"===this.token?(n=!0,this.read_short_form(this.tok.T_ENDFOR)):this.read_statement(),n)},read_foreach:function(){var t=this.node("foreach");this.expect(this.tok.T_FOREACH)&&this.next();var e,r=null,i=null,n=!1;return this.expect("(")&&this.next(),e=this.read_expr(),this.expect(this.tok.T_AS)&&(this.next(),i=this.read_foreach_variable(),this.token===this.tok.T_DOUBLE_ARROW&&(r=i,i=this.next().read_foreach_variable())),r&&"list"===r.kind&&this.raiseError("Fatal Error : Cannot use list as key element"),this.expect(")")&&this.next(),t(e,r,i,":"===this.token?(n=!0,this.read_short_form(this.tok.T_ENDFOREACH)):this.read_statement(),n)},read_foreach_variable:function(){if(this.token!==this.tok.T_LIST&&"["!==this.token)return this.read_variable(!1,!1,!1);var t="["===this.token,e=this.node("list");this.next(),!t&&this.expect("(")&&this.next();var r=this.read_array_pair_list(t);return this.expect(t?"]":")")&&this.next(),e(r,t)}}},function(t,e,r){"use strict";t.exports={read_start:function(){return this.token==this.tok.T_NAMESPACE?this.read_namespace():this.read_top_statement()}}},function(t,e,r){"use strict";t.exports={read_namespace:function(){var t,e=this.node("namespace");if(this.expect(this.tok.T_NAMESPACE)&&this.next(),"{"==this.token)return this.currentNamespace=[""],t=this.next().read_top_statements(),this.expect("}")&&this.next(),e([""],t,!0);var r=this.read_namespace_name();return";"==this.token?(this.currentNamespace=r,t=this.next().read_top_statements(),this.expect(this.EOF),e(r.name,t,!1)):"{"==this.token?(this.currentNamespace=r,t=this.next().read_top_statements(),this.expect("}")&&this.next(),e(r.name,t,!0)):"("===this.token?(r.resolution=this.ast.reference.RELATIVE_NAME,r.name=r.name.substring(1),e.destroy(),this.node("call")(r,this.read_function_argument_list())):(this.error(["{",";"]),this.currentNamespace=r,t=this.read_top_statements(),this.expect(this.EOF),e(r,t,!1))},read_namespace_name:function(t){var e=this.node(),r=!1;this.token===this.tok.T_NAMESPACE&&(this.next().expect(this.tok.T_NS_SEPARATOR)&&this.next(),r=!0);var i=this.read_list(this.tok.T_STRING,this.tok.T_NS_SEPARATOR,!0);if(!r&&1===i.length&&(t||"("!==this.token)){if("parent"===i[0].toLowerCase())return e("parentreference",i[0]);if("self"===i[0].toLowerCase())return e("selfreference",i[0])}return e("classreference",i,r)},read_use_statement:function(){var t=this.node("usegroup"),e=[],r=null;this.expect(this.tok.T_USE)&&this.next();var i=this.read_use_type();return e.push(this.read_use_declaration(!1)),","===this.token?e=e.concat(this.next().read_use_declarations(!1)):"{"===this.token&&(r=e[0].name,e=this.next().read_use_declarations(null===i),this.expect("}")&&this.next()),t=t(r,i,e),this.expect(";")&&this.next(),t},read_class_name_reference:function(){return this.read_variable(!0,!1,!1)},read_use_declaration:function(t){var e=this.node("useitem"),r=null;t&&(r=this.read_use_type());var i=this.read_namespace_name(),n=this.read_use_alias();return e(i.name,n,r)},read_use_declarations:function(t){for(var e=[this.read_use_declaration(t)];","===this.token;){if(this.next(),t){if(this.token!==this.tok.T_FUNCTION&&this.token!==this.tok.T_CONST&&this.token!==this.tok.T_STRING)break}else if(this.token!==this.tok.T_STRING&&this.token!==this.tok.T_NS_SEPARATOR)break;e.push(this.read_use_declaration(t))}return e},read_use_alias:function(){var t=null;if(this.token===this.tok.T_AS&&this.next().expect(this.tok.T_STRING)){var e=this.node("identifier"),r=this.text();this.next(),t=e(r)}return t},read_use_type:function(){return this.token===this.tok.T_FUNCTION?(this.next(),this.ast.useitem.TYPE_FUNCTION):this.token===this.tok.T_CONST?(this.next(),this.ast.useitem.TYPE_CONST):null}}},function(t,e,r){"use strict";var i={"\\r":"\r","\\n":"\n","\\t":"\t","\\v":String.fromCharCode(11),"\\e":String.fromCharCode(27),"\\f":String.fromCharCode(12),"\\\\":"\\","\\$":"$",'\\"':'"',"\\'":"'"};t.exports={resolve_special_chars:function(t,e){return e?t.replace(/\\[rntvef"'\\$]/g,function(t){return i[t]}):t.replace(/\\['\\]/g,function(t){return i[t]})},read_scalar:function(){if(this.is("T_MAGIC_CONST"))return this.get_magic_constant();var t,e;switch(this.token){case this.tok.T_CONSTANT_ENCAPSED_STRING:t=this.node("string");var r=this.text(),i=0;"b"!==r[0]&&"B"!==r[0]||(i=1);var n='"'===r[i];return this.next(),t=t(n,this.resolve_special_chars(r.substring(i+1,r.length-1),n),1===i,r),this.token===this.tok.T_DOUBLE_COLON?this.read_static_getter(t):t;case this.tok.T_START_HEREDOC:if("ST_NOWDOC"!==this.lexer.curCondition)return this.read_encapsed_string(this.tok.T_END_HEREDOC);var o=this.lexer.yylloc.first_offset;e=this.node("nowdoc");var s=(t=this.next().text())[t.length-1];"\n"===s?t="\r"===t[t.length-2]?t.substring(0,t.length-2):t.substring(0,t.length-1):"\r"===s&&(t=t.substring(0,t.length-1)),this.expect(this.tok.T_ENCAPSED_AND_WHITESPACE)&&this.next();var a=this.lexer._input.substring(o,this.lexer.yylloc.last_offset);return this.expect(this.tok.T_END_HEREDOC)&&this.next(),e=e(t,a,this.lexer.heredoc_label,'"'===a[3]||"'"===a[3]);case'"':return this.read_encapsed_string('"');case'b"':case'B"':return this.read_encapsed_string('"',!0);case this.tok.T_LNUMBER:case this.tok.T_DNUMBER:var l=this.node("number");return t=this.text(),this.next(),l(t,null);case this.tok.T_ARRAY:case"[":return this.read_array();default:var h=this.error("SCALAR");return this.next(),h}},read_dereferencable:function(t){var e,r,i=this.node("offsetlookup");return"["===this.token?(r=this.next().read_expr(),this.expect("]")&&this.next(),e=i(t,r)):this.token===this.tok.T_DOLLAR_OPEN_CURLY_BRACES&&(e=i(t,r=this.read_encapsed_string_item(!1))),e},read_encapsed_string_item:function(t){var e,r,i,n=this.node("encapsedpart"),o=!1,s=this.node();if(this.token===this.tok.T_ENCAPSED_AND_WHITESPACE){var a=this.text();this.next(),s=s("string",!1,this.resolve_special_chars(a,t),!1,a)}else if(this.token===this.tok.T_DOLLAR_OPEN_CURLY_BRACES){if(i=null,this.next().token===this.tok.T_STRING_VARNAME){i=this.node("variable");var l=this.text();this.next(),i="["===this.token?(i=i(l,!1,!1),r=this.node("offsetlookup"),e=this.next().read_expr(),this.expect("]")&&this.next(),r(i,e)):l}else i=this.read_expr();this.expect("}")&&this.next(),s=s("variable",i,!1,!0)}else if(this.token===this.tok.T_CURLY_OPEN)o=!0,s.destroy(),s=this.next().read_variable(!1,!1,!1),this.expect("}")&&this.next();else if(this.token===this.tok.T_VARIABLE){if(s.destroy(),s=this.read_simple_variable(!1),"["===this.token&&(r=this.node("offsetlookup"),e=this.next().read_encaps_var_offset(),this.expect("]")&&this.next(),s=r(s,e)),this.token===this.tok.T_OBJECT_OPERATOR){r=this.node("propertylookup"),this.next().expect(this.tok.T_STRING);var h=this.node("identifier");i=this.text(),this.next(),s=r(s,h(i))}}else{this.expect(this.tok.T_ENCAPSED_AND_WHITESPACE);var c=this.text();this.next(),s.destroy(),s=s("string",!1,c,!1,c)}return n(s,o)},read_encapsed_string:function(t,e){var r=1<arguments.length&&void 0!==e&&e,i=this.node("encapsed");this.next();var n=this.lexer.yylloc.prev_offset-(r?1:0),o=[],s=null;for(s="`"===t?this.ast.encapsed.TYPE_SHELL:'"'===t?this.ast.encapsed.TYPE_STRING:this.ast.encapsed.TYPE_HEREDOC;this.token!==t&&this.token!==this.EOF;)o.push(this.read_encapsed_string_item(!0));return this.expect(t)&&this.next(),i=i(o,this.lexer._input.substring(n-1,this.lexer.yylloc.first_offset),s),t===this.tok.T_END_HEREDOC&&(i.label=this.lexer.heredoc_label),i},get_magic_constant:function(){var t=this.node("magic"),e=this.text();return this.next(),t(e.toUpperCase(),e)}}},function(t,e,r){"use strict";t.exports={read_top_statements:function(){for(var t=[];this.token!==this.EOF&&"}"!==this.token;){var e=this.read_top_statement();e&&(Array.isArray(e)?t=t.concat(e):t.push(e))}return t},read_top_statement:function(){switch(this.token){case this.tok.T_FUNCTION:return this.read_function(!1,!1);case this.tok.T_ABSTRACT:case this.tok.T_FINAL:case this.tok.T_CLASS:return this.read_class();case this.tok.T_INTERFACE:return this.read_interface();case this.tok.T_TRAIT:return this.read_trait();case this.tok.T_USE:return this.read_use_statement();case this.tok.T_CONST:var t=this.node("constantstatement"),e=this.next().read_const_list();return this.expectEndOfStatement(),t(null,e);case this.tok.T_NAMESPACE:return this.read_namespace();case this.tok.T_HALT_COMPILER:var r=this.node("halt");return this.next().expect("(")&&this.next(),this.expect(")")&&this.next(),this.expect(";"),this.lexer.done=!0,r(this.lexer._input.substring(this.lexer.offset));default:return this.read_statement()}},read_inner_statements:function(){for(var t=[];this.token!=this.EOF&&"}"!==this.token;){var e=this.read_inner_statement();e&&(Array.isArray(e)?t=t.concat(e):t.push(e))}return t},read_const_list:function(){return this.read_list(function(){this.expect(this.tok.T_STRING);var t=this.node("constant"),e=this.node("identifier"),r=this.text();return this.next(),e=e(r),this.expect("=")?t(e,this.next().read_expr()):t(e,null)},",",!1)},read_declare_list:function(){for(var t=[];this.token!=this.EOF&&")"!==this.token;){this.expect(this.tok.T_STRING);var e=this.node("declaredirective"),r=this.node("identifier"),i=this.text();this.next(),r=r(i);var n=null;if(this.expect("=")&&(n=this.next().read_expr()),t.push(e(r,n)),","!==this.token)break;this.next()}return t},read_inner_statement:function(){switch(this.token){case this.tok.T_FUNCTION:return this.read_function(!1,!1);case this.tok.T_ABSTRACT:case this.tok.T_FINAL:case this.tok.T_CLASS:return this.read_class();case this.tok.T_INTERFACE:return this.read_interface();case this.tok.T_TRAIT:return this.read_trait();case this.tok.T_HALT_COMPILER:this.raiseError("__HALT_COMPILER() can only be used from the outermost scope");var t=this.node("halt");return this.next().expect("(")&&this.next(),this.expect(")")&&this.next(),t=t(this.lexer._input.substring(this.lexer.offset)),this.expect(";")&&this.next(),t;default:return this.read_statement()}},read_statement:function(){switch(this.token){case"{":return this.read_code_block(!1);case this.tok.T_IF:return this.read_if();case this.tok.T_SWITCH:return this.read_switch();case this.tok.T_FOR:return this.read_for();case this.tok.T_FOREACH:return this.read_foreach();case this.tok.T_WHILE:return this.read_while();case this.tok.T_DO:return this.read_do();case this.tok.T_COMMENT:return this.read_comment();case this.tok.T_DOC_COMMENT:return this.read_doc_comment();case this.tok.T_RETURN:var t=this.node("return"),e=null;return this.next().is("EOS")||(e=this.read_expr()),this.expectEndOfStatement(),t(e);case this.tok.T_BREAK:case this.tok.T_CONTINUE:var r=this.node(this.token===this.tok.T_CONTINUE?"continue":"break"),i=null;return this.next(),";"!==this.token&&(i=this.read_expr()),this.expectEndOfStatement(),r(i);case this.tok.T_GLOBAL:var n=this.node("global"),o=this.next().read_list(this.read_simple_variable,",");return this.expectEndOfStatement(),n(o);case this.tok.T_STATIC:var s=[this.token,this.lexer.getState()],a=this.node();if(this.next().token===this.tok.T_DOUBLE_COLON){this.lexer.tokens.push(s);var l=this.next().read_expr();return this.expectEndOfStatement(l),a("expressionstatement",l)}if(this.token===this.tok.T_FUNCTION)return this.read_function(!0,[0,1,0]);var h=this.read_variable_declarations();return this.expectEndOfStatement(),a("static",h);case this.tok.T_ECHO:var c=this.node("echo"),u=this.text(),f="<?="===u||"<%="===u,p=this.next().read_list(this.read_expr,",");return this.expectEndOfStatement(),c(p,f);case this.tok.T_INLINE_HTML:var d=this.text(),m=0<this.lexer.yylloc.first_offset?this.lexer._input[this.lexer.yylloc.first_offset-1]:null,g="\r"===m||"\n"===m;g&&"\n"===m&&1<this.lexer.yylloc.first_offset&&"\r"===this.lexer._input[this.lexer.yylloc.first_offset-2]&&(m="\r\n");var _=this.node("inline");return this.next(),_(d,g?m+d:d);case this.tok.T_UNSET:var v=this.node("unset");this.next().expect("(")&&this.next();var y=this.read_list(this.read_variable,",");return this.expect(")")&&this.next(),this.expect(";")&&this.next(),v(y);case this.tok.T_DECLARE:var x,T=this.node("declare"),k=[];this.next().expect("(")&&this.next();var b=this.read_declare_list();if(this.expect(")")&&this.next(),":"===this.token){for(this.next();this.token!=this.EOF&&this.token!==this.tok.T_ENDDECLARE;)k.push(this.read_top_statement());this.expect(this.tok.T_ENDDECLARE)&&this.next(),this.expectEndOfStatement(),x=this.ast.declare.MODE_SHORT}else if("{"===this.token){for(this.next();this.token!=this.EOF&&"}"!==this.token;)k.push(this.read_top_statement());this.expect("}")&&this.next(),x=this.ast.declare.MODE_BLOCK}else this.expect(";")&&this.next(),x=this.ast.declare.MODE_NONE;return T(b,k,x);case this.tok.T_TRY:return this.read_try();case this.tok.T_THROW:var w=this.node("throw"),E=this.next().read_expr();return this.expectEndOfStatement(),w(E);case";":return this.next(),null;case this.tok.T_STRING:var C=this.node(),S=[this.token,this.lexer.getState()],A=this.text();if(":"===this.next().token)return this.next(),C("label",A);C.destroy(),this.lexer.tokens.push(S);var L=this.node("expressionstatement"),N=this.next().read_expr();return this.expectEndOfStatement(N),L(N);case this.tok.T_GOTO:var O=this.node("goto"),I=null;return this.next().expect(this.tok.T_STRING)&&(I=this.text(),this.next().expectEndOfStatement()),O(I);default:var R=this.node("expressionstatement"),M=this.read_expr();return this.expectEndOfStatement(M),R(M)}},read_code_block:function(t){var e=this.node("block");this.expect("{")&&this.next();var r=t?this.read_top_statements():this.read_inner_statements();return this.expect("}")&&this.next(),e(null,r)}}},function(t,e,r){"use strict";t.exports={read_switch:function(){var t=this.node("switch");this.expect(this.tok.T_SWITCH)&&this.next(),this.expect("(")&&this.next();var e=this.read_expr();this.expect(")")&&this.next();var r=":"===this.token;return t(e,this.read_switch_case_list(),r)},read_switch_case_list:function(){var t=null,e=this.node("block"),r=[];for("{"===this.token?t="}":":"===this.token?t=this.tok.T_ENDSWITCH:this.expect(["{",":"]),";"===this.next().token&&this.next();this.token!==this.EOF&&this.token!==t;)r.push(this.read_case_list(t));return this.expect(t)&&this.next(),t===this.tok.T_ENDSWITCH&&this.expectEndOfStatement(),e(null,r)},read_case_list:function(t){var e=this.node("case"),r=null,i=null,n=[];for(this.token===this.tok.T_CASE?r=this.next().read_expr():this.token===this.tok.T_DEFAULT?this.next():this.expect([this.tok.T_CASE,this.tok.T_DEFAULT]),this.expect([":",";"])&&this.next(),i=this.node("block");this.token!=this.EOF&&this.token!==t&&this.token!==this.tok.T_CASE&&this.token!==this.tok.T_DEFAULT;)n.push(this.read_inner_statement());return e(r,0<n.length?i(null,n):null)}}},function(t,e,r){"use strict";t.exports={read_try:function(){this.expect(this.tok.T_TRY);for(var t=this.node("try"),e=null,r=[],i=this.next().read_statement();this.token===this.tok.T_CATCH;){var n=this.node("catch");this.next().expect("(")&&this.next();var o=this.read_list(this.read_namespace_name,"|",!1),s=this.read_variable(!0,!1,!1);this.expect(")"),r.push(n(this.next().read_statement(),o,s))}return this.token===this.tok.T_FINALLY&&(e=this.next().read_statement()),t(i,r,e)}}},function(t,e,r){"use strict";t.exports={read_short_form:function(t){var e=this.node("block"),r=[];for(this.expect(":")&&this.next();this.token!=this.EOF&&this.token!==t;)r.push(this.read_inner_statement());return this.expect(t)&&this.next(),this.expectEndOfStatement(),e(null,r)},read_list:function(t,e,r){var i=[];if(this.token==e&&(r&&i.push("function"==typeof t?this.node("noop")():null),this.next()),"function"==typeof t){do{if(i.push(t.apply(this,[])),this.token!=e)break}while(this.next().token!=this.EOF)}else{if(!this.expect(t))return[];for(i.push(this.text());this.next().token!=this.EOF&&this.token==e&&this.next().token==t;)i.push(this.text())}return i},read_name_list:function(){return this.read_list(this.read_namespace_name,",",!1)},read_variable_declarations:function(){return this.read_list(function(){var t=this.node("staticvariable"),e=this.node("variable");if(this.expect(this.tok.T_VARIABLE)){var r=this.text().substring(1);this.next(),e=e(r,!1,!1)}else e=e("#ERR",!1,!1);return"="===this.token?t(e,this.next().read_expr()):e},",")}}},function(t,e,r){"use strict";t.exports={read_variable:function(t,e,r){var i;if(r||"&"!==this.token||(r=!0,this.next()),this.is([this.tok.T_VARIABLE,"$"]))i=this.read_reference_variable(e,r);else if(this.is([this.tok.T_NS_SEPARATOR,this.tok.T_STRING,this.tok.T_NAMESPACE])){i=this.node();var n=this.read_namespace_name();if(this.token!=this.tok.T_DOUBLE_COLON&&"("!=this.token&&-1===["parentreference","selfreference"].indexOf(n.kind)){var o=n.name.toLowerCase();i="true"===o?n.destroy(i("boolean",!0,n.name)):"false"===o?n.destroy(i("boolean",!1,n.name)):i("identifier",n)}else i.destroy(n),i=n}else if(this.token===this.tok.T_STATIC){i=this.node("staticreference");var s=this.text();this.next(),i=i(s)}else this.expect("VARIABLE");return this.token===this.tok.T_DOUBLE_COLON&&(i=this.read_static_getter(i,e)),this.recursive_variable_chain_scan(i,t,e)},read_static_getter:function(t,e){var r,i,n=this.node("staticlookup");return this.next().is([this.tok.T_VARIABLE,"$"])?r=this.read_reference_variable(e,!1):this.token===this.tok.T_STRING||this.token===this.tok.T_CLASS||this.php7&&this.is("IDENTIFIER")?(r=this.node("identifier"),i=this.text(),this.next(),r=r(i)):"{"===this.token?(r=this.node("literal"),i=this.next().read_expr(),this.expect("}")&&this.next(),r=r("literal",i,null),this.expect("(")):(this.error([this.tok.T_VARIABLE,this.tok.T_STRING]),r=this.node("identifier"),i=this.text(),this.next(),r=r(i)),n(t,r)},read_what:function(t){var e=0<arguments.length&&void 0!==t&&t,r=null,i=null;switch(this.next().token){case this.tok.T_STRING:if(r=this.node("identifier"),i=this.text(),this.next(),r=r(i),e&&this.token===this.tok.T_OBJECT_OPERATOR&&this.error(),this.token===this.tok.T_VARIABLE){var n=this.node("variable");i=this.text().substring(1),this.next(),(r=this.node("encapsed")([r,n(i,!1,!1)],null,"offset")).loc&&r.value[0].loc&&(r.loc.start=r.value[0].loc.start)}else if("{"===this.token){var o=this.next().read_expr();this.expect("}")&&this.next(),(r=this.node("encapsed")([r,o],null,"offset")).loc&&r.value[0].loc&&(r.loc.start=r.value[0].loc.start)}break;case this.tok.T_VARIABLE:r=this.node("variable"),i=this.text().substring(1),this.next(),r=r(i,!1,!1);break;case"$":r=this.node(),this.next().expect(["$","{",this.tok.T_VARIABLE]),r="{"===this.token?(i=this.next().read_expr(),this.expect("}")&&this.next(),r("literal","literal",i,null)):r("variable",i=this.read_expr(),!1,!1);break;case"{":r=this.node("literal"),i=this.next().read_expr(),this.expect("}")&&this.next(),r=r("literal",i,null);break;default:this.error([this.tok.T_STRING,this.tok.T_VARIABLE,"$","{"]),r=this.node("identifier"),i=this.text(),this.next(),r=r(i)}return r},recursive_variable_chain_scan:function(t,e,r){var i,n;t:for(;this.token!=this.EOF;)switch(this.token){case"(":if(e)return t;t=this.node("call")(t,this.read_function_argument_list());break;case"[":i=this.node("offsetlookup"),this.next(),n=!1,r?(n=this.read_encaps_var_offset(),this.expect("]")&&this.next()):"]"!==this.token?(n=this.read_expr(),this.expect("]")&&this.next()):this.next(),t=i(t,n);break;case this.tok.T_DOUBLE_COLON:"staticlookup"===t.kind&&"identifier"===t.offset.kind&&this.error(),t=(i=this.node("staticlookup"))(t,this.read_what(!0));break;case this.tok.T_OBJECT_OPERATOR:t=(i=this.node("propertylookup"))(t,this.read_what());break;default:break t}return t},read_encaps_var_offset:function(){var t=this.node();if(this.token===this.tok.T_STRING){var e=this.text();this.next(),t=t("identifier",e)}else if(this.token===this.tok.T_NUM_STRING){var r=this.text();this.next(),t=t("number",r,null)}else if(this.token===this.tok.T_VARIABLE){var i=this.text().substring(1);this.next(),t=t("variable",i,!1,!1)}else{this.expect([this.tok.T_STRING,this.tok.T_NUM_STRING,this.tok.T_VARIABLE]);var n=this.text();this.next(),t=t("identifier",n)}return t},read_reference_variable:function(t,e){for(var r,i=this.read_simple_variable(e);this.token!=this.EOF;){var n=this.node();if("{"!=this.token||t){n.destroy();break}r=this.next().read_expr(),this.expect("}")&&this.next(),i=n("offsetlookup",i,r)}return i},read_simple_variable:function(t){var e,r=this.node("variable");if(this.expect([this.tok.T_VARIABLE,"$"])&&this.token===this.tok.T_VARIABLE)e=this.text().substring(1),this.next(),r=r(e,t,!1);else switch("$"===this.token&&this.next(),this.token){case"{":var i=this.next().read_expr();this.expect("}")&&this.next(),r=r(i,t,!0);break;case"$":r=r(this.read_simple_variable(!1),t,!1);break;case this.tok.T_VARIABLE:e=this.text().substring(1);var n=this.node("variable");this.next(),r=r(n(e,!1,!1),t,!1);break;default:this.error(["{","$",this.tok.T_VARIABLE]),e=this.text(),this.next(),r=r(e,t,!1)}return r}}},function(t,e,r){"use strict";t.exports={values:{101:"T_HALT_COMPILER",102:"T_USE",103:"T_ENCAPSED_AND_WHITESPACE",104:"T_OBJECT_OPERATOR",105:"T_STRING",106:"T_DOLLAR_OPEN_CURLY_BRACES",107:"T_STRING_VARNAME",108:"T_CURLY_OPEN",109:"T_NUM_STRING",110:"T_ISSET",111:"T_EMPTY",112:"T_INCLUDE",113:"T_INCLUDE_ONCE",114:"T_EVAL",115:"T_REQUIRE",116:"T_REQUIRE_ONCE",117:"T_NAMESPACE",118:"T_NS_SEPARATOR",119:"T_AS",120:"T_IF",121:"T_ENDIF",122:"T_WHILE",123:"T_DO",124:"T_FOR",125:"T_SWITCH",126:"T_BREAK",127:"T_CONTINUE",128:"T_RETURN",129:"T_GLOBAL",130:"T_STATIC",131:"T_ECHO",132:"T_INLINE_HTML",133:"T_UNSET",134:"T_FOREACH",135:"T_DECLARE",136:"T_TRY",137:"T_THROW",138:"T_GOTO",139:"T_FINALLY",140:"T_CATCH",141:"T_ENDDECLARE",142:"T_LIST",143:"T_CLONE",144:"T_PLUS_EQUAL",145:"T_MINUS_EQUAL",146:"T_MUL_EQUAL",147:"T_DIV_EQUAL",148:"T_CONCAT_EQUAL",149:"T_MOD_EQUAL",150:"T_AND_EQUAL",151:"T_OR_EQUAL",152:"T_XOR_EQUAL",153:"T_SL_EQUAL",154:"T_SR_EQUAL",155:"T_INC",156:"T_DEC",157:"T_BOOLEAN_OR",158:"T_BOOLEAN_AND",159:"T_LOGICAL_OR",160:"T_LOGICAL_AND",161:"T_LOGICAL_XOR",162:"T_SL",163:"T_SR",164:"T_IS_IDENTICAL",165:"T_IS_NOT_IDENTICAL",166:"T_IS_EQUAL",167:"T_IS_NOT_EQUAL",168:"T_IS_SMALLER_OR_EQUAL",169:"T_IS_GREATER_OR_EQUAL",170:"T_INSTANCEOF",171:"T_INT_CAST",172:"T_DOUBLE_CAST",173:"T_STRING_CAST",174:"T_ARRAY_CAST",175:"T_OBJECT_CAST",176:"T_BOOL_CAST",177:"T_UNSET_CAST",178:"T_EXIT",179:"T_PRINT",180:"T_YIELD",181:"T_YIELD_FROM",182:"T_FUNCTION",183:"T_DOUBLE_ARROW",184:"T_DOUBLE_COLON",185:"T_ARRAY",186:"T_CALLABLE",187:"T_CLASS",188:"T_ABSTRACT",189:"T_TRAIT",190:"T_FINAL",191:"T_EXTENDS",192:"T_INTERFACE",193:"T_IMPLEMENTS",194:"T_VAR",195:"T_PUBLIC",196:"T_PROTECTED",197:"T_PRIVATE",198:"T_CONST",199:"T_NEW",200:"T_INSTEADOF",201:"T_ELSEIF",202:"T_ELSE",203:"T_ENDSWITCH",204:"T_CASE",205:"T_DEFAULT",206:"T_ENDFOR",207:"T_ENDFOREACH",208:"T_ENDWHILE",209:"T_CONSTANT_ENCAPSED_STRING",210:"T_LNUMBER",211:"T_DNUMBER",212:"T_LINE",213:"T_FILE",214:"T_DIR",215:"T_TRAIT_C",216:"T_METHOD_C",217:"T_FUNC_C",218:"T_NS_C",219:"T_START_HEREDOC",220:"T_END_HEREDOC",221:"T_CLASS_C",222:"T_VARIABLE",223:"T_OPEN_TAG",224:"T_OPEN_TAG_WITH_ECHO",225:"T_CLOSE_TAG",226:"T_WHITESPACE",227:"T_COMMENT",228:"T_DOC_COMMENT",229:"T_ELLIPSIS",230:"T_COALESCE",231:"T_POW",232:"T_POW_EQUAL",233:"T_SPACESHIP"},names:{T_HALT_COMPILER:101,T_USE:102,T_ENCAPSED_AND_WHITESPACE:103,T_OBJECT_OPERATOR:104,T_STRING:105,T_DOLLAR_OPEN_CURLY_BRACES:106,T_STRING_VARNAME:107,T_CURLY_OPEN:108,T_NUM_STRING:109,T_ISSET:110,T_EMPTY:111,T_INCLUDE:112,T_INCLUDE_ONCE:113,T_EVAL:114,T_REQUIRE:115,T_REQUIRE_ONCE:116,T_NAMESPACE:117,T_NS_SEPARATOR:118,T_AS:119,T_IF:120,T_ENDIF:121,T_WHILE:122,T_DO:123,T_FOR:124,T_SWITCH:125,T_BREAK:126,T_CONTINUE:127,T_RETURN:128,T_GLOBAL:129,T_STATIC:130,T_ECHO:131,T_INLINE_HTML:132,T_UNSET:133,T_FOREACH:134,T_DECLARE:135,T_TRY:136,T_THROW:137,T_GOTO:138,T_FINALLY:139,T_CATCH:140,T_ENDDECLARE:141,T_LIST:142,T_CLONE:143,T_PLUS_EQUAL:144,T_MINUS_EQUAL:145,T_MUL_EQUAL:146,T_DIV_EQUAL:147,T_CONCAT_EQUAL:148,T_MOD_EQUAL:149,T_AND_EQUAL:150,T_OR_EQUAL:151,T_XOR_EQUAL:152,T_SL_EQUAL:153,T_SR_EQUAL:154,T_INC:155,T_DEC:156,T_BOOLEAN_OR:157,T_BOOLEAN_AND:158,T_LOGICAL_OR:159,T_LOGICAL_AND:160,T_LOGICAL_XOR:161,T_SL:162,T_SR:163,T_IS_IDENTICAL:164,T_IS_NOT_IDENTICAL:165,T_IS_EQUAL:166,T_IS_NOT_EQUAL:167,T_IS_SMALLER_OR_EQUAL:168,T_IS_GREATER_OR_EQUAL:169,T_INSTANCEOF:170,T_INT_CAST:171,T_DOUBLE_CAST:172,T_STRING_CAST:173,T_ARRAY_CAST:174,T_OBJECT_CAST:175,T_BOOL_CAST:176,T_UNSET_CAST:177,T_EXIT:178,T_PRINT:179,T_YIELD:180,T_YIELD_FROM:181,T_FUNCTION:182,T_DOUBLE_ARROW:183,T_DOUBLE_COLON:184,T_ARRAY:185,T_CALLABLE:186,T_CLASS:187,T_ABSTRACT:188,T_TRAIT:189,T_FINAL:190,T_EXTENDS:191,T_INTERFACE:192,T_IMPLEMENTS:193,T_VAR:194,T_PUBLIC:195,T_PROTECTED:196,T_PRIVATE:197,T_CONST:198,T_NEW:199,T_INSTEADOF:200,T_ELSEIF:201,T_ELSE:202,T_ENDSWITCH:203,T_CASE:204,T_DEFAULT:205,T_ENDFOR:206,T_ENDFOREACH:207,T_ENDWHILE:208,T_CONSTANT_ENCAPSED_STRING:209,T_LNUMBER:210,T_DNUMBER:211,T_LINE:212,T_FILE:213,T_DIR:214,T_TRAIT_C:215,T_METHOD_C:216,T_FUNC_C:217,T_NS_C:218,T_START_HEREDOC:219,T_END_HEREDOC:220,T_CLASS_C:221,T_VARIABLE:222,T_OPEN_TAG:223,T_OPEN_TAG_WITH_ECHO:224,T_CLOSE_TAG:225,T_WHITESPACE:226,T_COMMENT:227,T_DOC_COMMENT:228,T_ELLIPSIS:229,T_COALESCE:230,T_POW:231,T_POW_EQUAL:232,T_SPACESHIP:233}}},function(t,e,r){"use strict";function u(t,e){this.withPositions=t,this.withSource=e}var f=r(46),p=r(47);u.prototype.position=function(t){return new p(t.lexer.yylloc.first_line,t.lexer.yylloc.first_column,t.lexer.yylloc.first_offset)},u.precedence={},[["or"],["xor"],["and"],["="],["?"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","!=","===","!==","<=>"],["<","<=",">",">="],["<<",">>"],["+","-","."],["*","/","%"],["!"],["instanceof"],["cast"]].forEach(function(t,e){t.forEach(function(t){u.precedence[t]=e+1})}),u.prototype.swapLocations=function(t,e,r,i){this.withPositions&&(t.loc.start=e.loc.start,t.loc.end=r.loc.end,this.withSource&&(t.loc.source=i.lexer._input.substring(t.loc.start.offset,t.loc.end.offset)))},u.prototype.resolveLocations=function(t,e,r,i){this.withPositions&&(t.loc.start.offset>e.loc.start.offset&&(t.loc.start=e.loc.start),t.loc.end.offset<r.loc.end.offset&&(t.loc.end=r.loc.end),this.withSource&&(t.loc.source=i.lexer._input.substring(t.loc.start.offset,t.loc.end.offset)))},u.prototype.resolvePrecedence=function(t,e){var r,i,n;return"call"===t.kind?this.resolveLocations(t,t.what,t,e):"propertylookup"===t.kind||"staticlookup"===t.kind||"offsetlookup"===t.kind&&t.offset?this.resolveLocations(t,t.what,t.offset,e):"bin"===t.kind?t.right&&!t.right.parenthesizedExpression&&("bin"===t.right.kind?(i=u.precedence[t.type],n=u.precedence[t.right.type],i&&n&&n<=i&&(r=t.right,t.right=t.right.left,this.swapLocations(t,t.left,t.right,e),r.left=this.resolvePrecedence(t,e),t=r)):"retif"===t.right.kind&&(i=u.precedence[t.type],n=u.precedence["?"],i&&n&&n<=i&&(r=t.right,t.right=t.right.test,this.swapLocations(t,t.left,t.right,e),r.test=this.resolvePrecedence(t,e),this.swapLocations(r,r.test,r.falseExpr,e),t=r))):"cast"===t.kind&&t.what&&!t.what.parenthesizedExpression?"bin"===t.what.kind?(r=t.what,t.what=t.what.left,this.swapLocations(t,t,t.what,e),r.left=this.resolvePrecedence(t,e),this.swapLocations(r,r.left,r.right,e),t=r):"retif"===t.what.kind&&(r=t.what,t.what=t.what.test,this.swapLocations(t,t,t.what,e),r.test=this.resolvePrecedence(t,e),this.swapLocations(r,r.test,r.falseExpr,e),t=r):"unary"===t.kind?t.what&&!t.what.parenthesizedExpression&&("bin"===t.what.kind?(r=t.what,t.what=t.what.left,this.swapLocations(t,t,t.what,e),r.left=this.resolvePrecedence(t,e),this.swapLocations(r,r.left,r.right,e),t=r):"retif"===t.what.kind&&(r=t.what,t.what=t.what.test,this.swapLocations(t,t,t.what,e),r.test=this.resolvePrecedence(t,e),this.swapLocations(r,r.test,r.falseExpr,e),t=r)):"retif"===t.kind?t.falseExpr&&"retif"===t.falseExpr.kind&&!t.falseExpr.parenthesizedExpression&&(r=t.falseExpr,t.falseExpr=r.test,this.swapLocations(t,t.test,t.falseExpr,e),r.test=this.resolvePrecedence(t,e),this.swapLocations(r,r.test,r.falseExpr,e),t=r):"assign"===t.kind?t.right&&"bin"===t.right.kind&&!t.right.parenthesizedExpression&&(i=u.precedence["="],n=u.precedence[t.right.type],i&&n&&n<i&&(r=t.right,t.right=t.right.left,r.left=t,this.swapLocations(r,r.left,t.right,e),t=r)):"silent"===t.kind&&t.expr.right&&!t.expr.parenthesizedExpression&&(r=t.expr,t.expr=r.left,r.left=t,this.swapLocations(r,r.left,r.right,e),t=r),t},u.prototype.prepare=function(o,s,a){var l=null;(this.withPositions||this.withSource)&&(l=this.position(a));function h(){var t=null,e=Array.prototype.slice.call(arguments);if(e.push(s),"function"==typeof h.preBuild&&h.preBuild(arguments),c.withPositions||c.withSource){var r=null;c.withSource&&(r=a.lexer._input.substring(l.offset,a.prev[2])),t=c.withPositions?new f(r,l,new p(a.prev[0],a.prev[1],a.prev[2])):new f(r,null,null),e.push(t)}o=o||e.shift();var i=c[o];if("function"!=typeof i)throw new Error('Undefined node "'+o+'"');var n=Object.create(i.prototype);return i.apply(n,e),h.instance=n,h.trailingComments&&(n.trailingComments=h.trailingComments),"function"==typeof h.postBuild&&h.postBuild(n),a.debug&&delete u.stack[h.stackUid],c.resolvePrecedence(n,a)}var c=this;return a.debug&&(u.stack||(u.stack={},u.stackUid=1),u.stack[++u.stackUid]={position:l,stack:(new Error).stack.split("\n").slice(3,5)},h.stackUid=u.stackUid),h.setKind=function(t){o=t},h.setTrailingComments=function(t){h.instance?h.instance.setTrailingComments(t):h.trailingComments=t},h.destroy=function(t){s&&(t?t.leadingComments?t.leadingComments=s.concat(t.leadingComments):t.leadingComments=s:a._docIndex=a._docs.length-s.length),a.debug&&delete u.stack[h.stackUid]},h},u.prototype.checkNodes=function(){var t=[];for(var e in u.stack)u.stack.hasOwnProperty(e)&&t.push(u.stack[e]);return u.stack={},t},[r(48),r(49),r(50),r(7),r(51),r(52),r(53),r(54),r(55),r(56),r(57),r(58),r(59),r(60),r(61),r(9),r(62),r(63),r(64),r(10),r(65),r(5),r(66),r(67),r(68),r(69),r(70),r(71),r(72),r(73),r(74),r(75),r(76),r(1),r(77),r(78),r(79),r(11),r(80),r(81),r(82),r(83),r(84),r(85),r(86),r(87),r(88),r(89),r(90),r(3),r(8),r(91),r(92),r(93),r(94),r(2),r(95),r(96),r(97),r(98),r(4),r(99),r(100),r(101),r(102),r(103),r(104),r(105),r(106),r(107),r(6),r(108),r(109),r(110),r(111),r(0),r(112),r(113),r(114),r(115),r(116),r(117),r(118),r(119),r(120),r(121),r(122),r(123),r(124),r(125),r(126),r(127),r(128),r(129),r(130),r(131),r(132),r(133)].forEach(function(t){u.prototype[t.kind]=t}),t.exports=u},function(t,e,r){"use strict";t.exports=function(t,e,r){this.source=t,this.start=e,this.end=r}},function(t,e,r){"use strict";t.exports=function(t,e,r){this.line=t,this.column=e,this.offset=r}},function(t,e,r){"use strict";var n=r(1);t.exports=n.extends("array",function(t,e,r,i){n.apply(this,["array",r,i]),this.items=e,this.shortForm=t})},function(t,e,r){"use strict";var o=r(1);t.exports=o.extends("assign",function(t,e,r,i,n){o.apply(this,["assign",i,n]),this.operator=r,this.left=t,this.right=e})},function(t,e,r){"use strict";var o=r(4);t.exports=o.extends("bin",function(t,e,r,i,n){o.apply(this,["bin",i,n]),this.type=t,this.left=e,this.right=r})},function(t,e,r){"use strict";var n=r(3);t.exports=n.extends("boolean",function(t,e,r,i){n.apply(this,["boolean",t,e,r,i])})},function(t,e,r){"use strict";var i=r(0);t.exports=i.extends("break",function(t,e,r){i.apply(this,["break",e,r]),this.level=t})},function(t,e,r){"use strict";var n=r(1);t.exports=n.extends("call",function(t,e,r,i){n.apply(this,["call",r,i]),this.what=t,this.arguments=e})},function(t,e,r){"use strict";var n=r(0);t.exports=n.extends("case",function(t,e,r,i){n.apply(this,["case",r,i]),this.test=t,this.body=e})},function(t,e,r){"use strict";var o=r(4);t.exports=o.extends("cast",function(t,e,r,i,n){o.apply(this,["cast",i,n]),this.type=t,this.raw=e,this.what=r})},function(t,e,r){"use strict";var o=r(0);t.exports=o.extends("catch",function(t,e,r,i,n){o.apply(this,["catch",i,n]),this.body=t,this.what=e,this.variable=r})},function(t,e,r){"use strict";var a=r(5);t.exports=a.extends("class",function(t,e,r,i,n,o,s){a.apply(this,["class",t,o,s]),this.isAnonymous=!t,this.extends=e,this.implements=r,this.body=i,this.parseFlags(n)})},function(t,e,r){"use strict";var o=r(10),s="classconstant",i=o.extends(s,function(t,e,r,i,n){o.apply(this,[t||s,e,i,n]),this.parseFlags(r)});i.prototype.parseFlags=function(t){-1===t[0]?this.visibility="":null===t[0]?this.visibility=null:0===t[0]?this.visibility="public":1===t[0]?this.visibility="protected":2===t[0]&&(this.visibility="private")},t.exports=i},function(t,e,r){"use strict";var o=r(6),s="classreference",i=o.extends(s,function t(e,r,i,n){o.apply(this,[s,i,n]),r?this.resolution=t.RELATIVE_NAME:1===e.length?this.resolution=t.UNQUALIFIED_NAME:e[0]?this.resolution=t.QUALIFIED_NAME:this.resolution=t.FULL_QUALIFIED_NAME,this.name=e.join("\\")});i.UNQUALIFIED_NAME="uqn",i.QUALIFIED_NAME="qn",i.FULL_QUALIFIED_NAME="fqn",i.RELATIVE_NAME="rn",t.exports=i},function(t,e,r){"use strict";var i=r(1);t.exports=i.extends("clone",function(t,e,r){i.apply(this,["clone",e,r]),this.what=t})},function(t,e,r){"use strict";var l=r(1);t.exports=l.extends("closure",function(t,e,r,i,n,o,s,a){l.apply(this,["closure",s,a]),this.uses=r,this.arguments=t,this.byref=e,this.type=i,this.nullable=n,this.isStatic=o||!1,this.body=null})},function(t,e,r){"use strict";var i=r(9),n="commentblock";t.exports=i.extends(n,function(t,e,r){i.apply(this,[n,t,e,r])})},function(t,e,r){"use strict";var i=r(9),n="commentline";t.exports=i.extends(n,function(t,e,r){i.apply(this,[n,t,e,r])})},function(t,e,r){"use strict";var n=r(2);t.exports=n.extends("constant",function(t,e,r,i){n.apply(this,["constant",r,i]),this.name=t,this.value=e})},function(t,e,r){"use strict";var i=r(0);t.exports=i.extends("continue",function(t,e,r){i.apply(this,["continue",e,r]),this.level=t})},function(t,e,r){"use strict";var o=r(7),i=o.extends("declare",function(t,e,r,i,n){o.apply(this,["declare",e,i,n]),this.directives=t,this.mode=r});i.MODE_SHORT="short",i.MODE_BLOCK="block",i.MODE_NONE="none",t.exports=i},function(t,e,r){"use strict";var n=r(2),o="declaredirective";t.exports=n.extends(o,function(t,e,r,i){n.apply(this,[o,r,i]),this.key=t,this.value=e})},function(t,e,r){"use strict";var n=r(0);t.exports=n.extends("do",function(t,e,r,i){n.apply(this,["do",r,i]),this.test=t,this.body=e})},function(t,e,r){"use strict";var n=r(0);t.exports=n.extends("echo",function(t,e,r,i){n.apply(this,["echo",r,i]),this.shortForm=e,this.expressions=t})},function(t,e,r){"use strict";var i=r(1);t.exports=i.extends("empty",function(t,e,r){i.apply(this,["empty",e,r]),this.expression=t})},function(t,e,r){"use strict";var o=r(3),i=o.extends("encapsed",function(t,e,r,i,n){o.apply(this,["encapsed",t,e,i,n]),this.type=r});i.TYPE_STRING="string",i.TYPE_SHELL="shell",i.TYPE_HEREDOC="heredoc",i.TYPE_OFFSET="offset",t.exports=i},function(t,e,r){"use strict";var n=r(1),o="encapsedpart";t.exports=n.extends(o,function(t,e,r,i){n.apply(this,[o,r,i]),this.expression=t,this.curly=e})},function(t,e,r){"use strict";var n=r(1);t.exports=n.extends("entry",function(t,e,r,i){n.apply(this,["entry",r,i]),this.key=t,this.value=e})},function(t,e,r){"use strict";var s=r(2);t.exports=s.extends("error",function(t,e,r,i,n,o){s.apply(this,["error",n,o]),this.message=t,this.token=e,this.line=r,this.expected=i})},function(t,e,r){"use strict";var i=r(1);t.exports=i.extends("eval",function(t,e,r){i.apply(this,["eval",e,r]),this.source=t})},function(t,e,r){"use strict";var n=r(1);t.exports=n.extends("exit",function(t,e,r,i){n.apply(this,["exit",r,i]),this.status=t,this.useDie=e})},function(t,e,r){"use strict";var i=r(0),n="expressionstatement";t.exports=i.extends(n,function(t,e,r){i.apply(this,[n,e,r]),this.expression=t})},function(t,e,r){"use strict";var a=r(0);t.exports=a.extends("for",function(t,e,r,i,n,o,s){a.apply(this,["for",o,s]),this.init=t,this.test=e,this.increment=r,this.shortForm=n,this.body=i})},function(t,e,r){"use strict";var a=r(0);t.exports=a.extends("foreach",function(t,e,r,i,n,o,s){a.apply(this,["foreach",o,s]),this.source=t,this.key=e,this.value=r,this.shortForm=n,this.body=i})},function(t,e,r){"use strict";var i=r(0);t.exports=i.extends("global",function(t,e,r){i.apply(this,["global",e,r]),this.items=t})},function(t,e,r){"use strict";var i=r(0);t.exports=i.extends("goto",function(t,e,r){i.apply(this,["goto",e,r]),this.label=t})},function(t,e,r){"use strict";var i=r(0);t.exports=i.extends("halt",function(t,e,r){i.apply(this,["halt",e,r]),this.after=t})},function(t,e,r){"use strict";var i=r(2),n="identifier",o=i.extends(n,function(t,e,r){i.apply(this,[n,e,r]),this.name=t});t.exports=o},function(t,e,r){"use strict";var s=r(0);t.exports=s.extends("if",function(t,e,r,i,n,o){s.apply(this,["if",n,o]),this.test=t,this.body=e,this.alternate=r,this.shortForm=i})},function(t,e,r){"use strict";var o=r(1);t.exports=o.extends("include",function(t,e,r,i,n){o.apply(this,["include",i,n]),this.once=t,this.require=e,this.target=r})},function(t,e,r){"use strict";var n=r(3);t.exports=n.extends("inline",function(t,e,r,i){n.apply(this,["inline",t,e,r,i])})},function(t,e,r){"use strict";var o=r(5);t.exports=o.extends("interface",function(t,e,r,i,n){o.apply(this,["interface",t,i,n]),this.extends=e,this.body=r})},function(t,e,r){"use strict";var i=r(1);t.exports=i.extends("isset",function(t,e,r){i.apply(this,["isset",e,r]),this.variables=t})},function(t,e,r){"use strict";var i=r(0);t.exports=i.extends("label",function(t,e,r){i.apply(this,["label",e,r]),this.name=t})},function(t,e,r){"use strict";var n=r(1);t.exports=n.extends("list",function(t,e,r,i){n.apply(this,["list",r,i]),this.items=t,this.shortForm=e})},function(t,e,r){"use strict";var n=r(3);t.exports=n.extends("magic",function(t,e,r,i){n.apply(this,["magic",t,e,r,i])})},function(t,e,r){"use strict";var i=r(11);t.exports=i.extends("method",function(){i.apply(this,arguments),this.kind="method"})},function(t,e,r){"use strict";var o=r(7);t.exports=o.extends("namespace",function(t,e,r,i,n){o.apply(this,["namespace",e,i,n]),this.name=t,this.withBrackets=r||!1})},function(t,e,r){"use strict";var n=r(1);t.exports=n.extends("new",function(t,e,r,i){n.apply(this,["new",r,i]),this.what=t,this.arguments=e})},function(t,e,r){"use strict";var i=r(2);t.exports=i.extends("noop",function(t,e){i.apply(this,["noop",t,e])})},function(t,e,r){"use strict";var s=r(3);t.exports=s.extends("nowdoc",function(t,e,r,i,n,o){s.apply(this,["nowdoc",t,e,n,o]),this.label=r,this.quote=i})},function(t,e,r){"use strict";var n=r(3);t.exports=n.extends("number",function(t,e,r,i){n.apply(this,["number",t,e,r,i])})},function(t,e,r){"use strict";var n=r(8),o="offsetlookup";t.exports=n.extends(o,function(t,e,r,i){n.apply(this,[o,t,e,r,i])})},function(t,e,r){"use strict";var l=r(5);t.exports=l.extends("parameter",function(t,e,r,i,n,o,s,a){l.apply(this,["parameter",t,s,a]),this.value=r,this.type=e,this.byref=i,this.variadic=n,this.nullable=o})},function(t,e,r){"use strict";var i=r(6),n="parentreference",o=i.extends(n,function(t,e,r){i.apply(this,[n,e,r]),this.raw=t});t.exports=o},function(t,e,r){"use strict";var n=r(4);t.exports=n.extends("post",function(t,e,r,i){n.apply(this,["post",r,i]),this.type=t,this.what=e})},function(t,e,r){"use strict";var n=r(4);t.exports=n.extends("pre",function(t,e,r,i){n.apply(this,["pre",r,i]),this.type=t,this.what=e})},function(t,e,r){"use strict";var i=r(1);t.exports=i.extends("print",function(t,e,r){i.apply(this,["print",e,r]),this.expression=t})},function(t,e,r){"use strict";var s=r(7);t.exports=s.extends("program",function(t,e,r,i,n,o){s.apply(this,["program",t,n,o]),this.errors=e,r&&(this.comments=r),i&&(this.tokens=i)})},function(t,e,r){"use strict";var n=r(0);t.exports=n.extends("property",function(t,e,r,i){n.apply(this,["property",r,i]),this.name=t,this.value=e})},function(t,e,r){"use strict";var n=r(8),o="propertylookup";t.exports=n.extends(o,function(t,e,r,i){n.apply(this,[o,t,e,r,i])})},function(t,e,r){"use strict";var o=r(0),s="propertystatement",i=o.extends(s,function(t,e,r,i,n){o.apply(this,[s,i,n]),this.properties=e,this.parseFlags(r)});i.prototype.parseFlags=function(t){-1===t[0]?this.visibility="":null===t[0]?this.visibility=null:0===t[0]?this.visibility="public":1===t[0]?this.visibility="protected":2===t[0]&&(this.visibility="private"),this.isStatic=1===t[1]},t.exports=i},function(t,e,r){"use strict";var o=r(1);t.exports=o.extends("retif",function(t,e,r,i,n){o.apply(this,["retif",i,n]),this.test=t,this.trueExpr=e,this.falseExpr=r})},function(t,e,r){"use strict";var i=r(0);t.exports=i.extends("return",function(t,e,r){i.apply(this,["return",e,r]),this.expr=t})},function(t,e,r){"use strict";var i=r(6),n="selfreference",o=i.extends(n,function(t,e,r){i.apply(this,[n,e,r]),this.raw=t});t.exports=o},function(t,e,r){"use strict";var i=r(1);t.exports=i.extends("silent",function(t,e,r){i.apply(this,["silent",e,r]),this.expr=t})},function(t,e,r){"use strict";var i=r(0);t.exports=i.extends("static",function(t,e,r){i.apply(this,["static",e,r]),this.variables=t})},function(t,e,r){"use strict";var n=r(2),o="staticvariable";t.exports=n.extends(o,function(t,e,r,i){n.apply(this,[o,r,i]),this.variable=t,this.defaultValue=e})},function(t,e,r){"use strict";var n=r(8),o="staticlookup";t.exports=n.extends(o,function(t,e,r,i){n.apply(this,[o,t,e,r,i])})},function(t,e,r){"use strict";var i=r(6),n="staticreference",o=i.extends(n,function(t,e,r){i.apply(this,[n,e,r]),this.raw=t});t.exports=o},function(t,e,r){"use strict";var s=r(3);t.exports=s.extends("string",function(t,e,r,i,n,o){s.apply(this,["string",e,i,n,o]),this.unicode=r,this.isDoubleQuote=t})},function(t,e,r){"use strict";var o=r(0);t.exports=o.extends("switch",function(t,e,r,i,n){o.apply(this,["switch",i,n]),this.test=t,this.body=e,this.shortForm=r})},function(t,e,r){"use strict";var i=r(0);t.exports=i.extends("throw",function(t,e,r){i.apply(this,["throw",e,r]),this.what=t})},function(t,e,r){"use strict";var n=r(5);t.exports=n.extends("trait",function(t,e,r,i){n.apply(this,["trait",t,r,i]),this.body=e})},function(t,e,r){"use strict";var s=r(2),a="traitalias";t.exports=s.extends(a,function(t,e,r,i,n,o){s.apply(this,[a,n,o]),this.trait=t,this.method=e,this.as=r,this.visibility="",i&&(0===i[0]?this.visibility="public":1===i[0]?this.visibility="protected":2===i[0]&&(this.visibility="private"))})},function(t,e,r){"use strict";var o=r(2),s="traitprecedence";t.exports=o.extends(s,function(t,e,r,i,n){o.apply(this,[s,i,n]),this.trait=t,this.method=e,this.instead=r})},function(t,e,r){"use strict";var n=r(2);t.exports=n.extends("traituse",function(t,e,r,i){n.apply(this,["traituse",r,i]),this.traits=t,this.adaptations=e})},function(t,e,r){"use strict";var o=r(0);t.exports=o.extends("try",function(t,e,r,i,n){o.apply(this,["try",i,n]),this.body=t,this.catches=e,this.always=r})},function(t,e,r){"use strict";var n=r(6),o="typereference",i=n.extends(o,function(t,e,r,i){n.apply(this,[o,r,i]),this.name=t,this.raw=e});i.types=["int","float","string","bool","object","array","callable","iterable","void"],t.exports=i},function(t,e,r){"use strict";var n=r(4);t.exports=n.extends("unary",function(t,e,r,i){n.apply(this,["unary",r,i]),this.type=t,this.what=e})},function(t,e,r){"use strict";var i=r(0);t.exports=i.extends("unset",function(t,e,r){i.apply(this,["unset",e,r]),this.variables=t})},function(t,e,r){"use strict";var o=r(0);t.exports=o.extends("usegroup",function(t,e,r,i,n){o.apply(this,["usegroup",i,n]),this.name=t,this.type=e,this.items=r})},function(t,e,r){"use strict";var o=r(0),i=o.extends("useitem",function(t,e,r,i,n){o.apply(this,["useitem",i,n]),this.name=t,this.alias=e,this.type=r});i.TYPE_CONST="const",i.TYPE_FUNCTION="function",t.exports=i},function(t,e,r){"use strict";var o=r(1);t.exports=o.extends("variable",function(t,e,r,i,n){o.apply(this,["variable",i,n]),this.name=t,this.byref=e||!1,this.curly=r||!1})},function(t,e,r){"use strict";var i=r(1);t.exports=i.extends("variadic",function(t,e,r){i.apply(this,["variadic",e,r]),this.what=t})},function(t,e,r){"use strict";var o=r(0);t.exports=o.extends("while",function(t,e,r,i,n){o.apply(this,["while",i,n]),this.test=t,this.body=e,this.shortForm=r})},function(t,e,r){"use strict";var n=r(1);t.exports=n.extends("yield",function(t,e,r,i){n.apply(this,["yield",r,i]),this.value=t,this.key=e})},function(t,e,r){"use strict";var i=r(1);t.exports=i.extends("yieldfrom",function(t,e,r){i.apply(this,["yieldfrom",e,r]),this.value=t})}],n.c=i,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=12)).default;function n(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return r[t].call(e.exports,e,e.exports,n),e.l=!0,e.exports}var r,i},"object"==typeof n&&"object"==typeof i?i.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof n?n.PhpParser=r():e.PhpParser=r()}).call(this,t("buffer").Buffer)},{buffer:4}]},{},[1]);